Copyright | Copyright 2022-2024 Mike Pilgrem |
---|---|
License | BSD-3-Clause |
Maintainer | public@pilgrem.com |
Stability | Experimental |
Portability | Portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
System.Random.Atmospheric.Api
Description
Haskell bindings to the RANDOM.ORG Core API (Release 4). The API provides access to a true random number generator (TRNG) based on atmospheric noise.
NB: The use of the API's services is subject to the terms and conditions of Randomness and Integrity Services Limited.
This module has no connection with Randomness and Integrity Services Limited or its affilates or the RANDOM.ORG domain.
The Core API comprises the Basic API and the Signed API.
Synopsis
- genIntegers :: Manager -> Key -> Bool -> Int -> Int -> Int -> IO (Maybe ([Int], Int))
- genIntegerSequences :: Manager -> Key -> Bool -> Int -> Int -> Int -> Int -> IO (Maybe ([[Int]], Int))
- genIntegerSequencesMultiform :: Manager -> Key -> Bool -> Int -> [Int] -> Boundary -> Boundary -> IO (Maybe ([[Int]], Int))
- genDecimalFractions :: Manager -> Key -> Bool -> Int -> Int -> IO (Maybe ([Double], Int))
- genGaussians :: Manager -> Key -> Int -> Double -> Double -> Int -> IO (Maybe ([Double], Int))
- genStrings :: Manager -> Key -> Bool -> Int -> Int -> [Char] -> IO (Maybe ([Text], Int))
- genUUIDs :: Manager -> Key -> Int -> IO (Maybe ([UUID], Int))
- genBlobs :: Manager -> Key -> Int -> Int -> BlobFormat -> IO (Maybe ([Blob], Int))
- genIntegers' :: Manager -> Key -> Bool -> Int -> Int -> Int -> IO (Either ClientError (RndResponse [Int]))
- genIntegerSequences' :: Manager -> Key -> Bool -> Int -> Int -> Int -> Int -> IO (Either ClientError (RndResponse [[Int]]))
- genIntegerSequencesMultiform' :: Manager -> Key -> Bool -> Int -> [Int] -> Boundary -> Boundary -> IO (Either ClientError (RndResponse [[Int]]))
- genDecimalFractions' :: Manager -> Key -> Bool -> Int -> Int -> IO (Either ClientError (RndResponse [Double]))
- genGaussians' :: Manager -> Key -> Int -> Double -> Double -> Int -> IO (Either ClientError (RndResponse [Double]))
- genStrings' :: Manager -> Key -> Bool -> Int -> Int -> [Char] -> IO (Either ClientError (RndResponse [Text]))
- genUUIDs' :: Manager -> Key -> Int -> IO (Either ClientError (RndResponse [UUID]))
- genBlobs' :: Manager -> Key -> Int -> Int -> BlobFormat -> IO (Either ClientError (RndResponse [Blob]))
- genWithSeedIntegers :: Manager -> Key -> Maybe Seed -> Bool -> Int -> Int -> Int -> IO (Maybe ([Int], Int))
- genWithSeedIntegerSequences :: Manager -> Key -> Maybe Seed -> Bool -> Int -> Int -> Int -> Int -> IO (Maybe ([[Int]], Int))
- genWithSeedIntegerSequencesMultiform :: Manager -> Key -> Maybe Seed -> Bool -> Int -> [Int] -> Boundary -> Boundary -> IO (Maybe ([[Int]], Int))
- genWithSeedDecimalFractions :: Manager -> Key -> Maybe Seed -> Bool -> Int -> Int -> IO (Maybe ([Double], Int))
- genWithSeedGaussians :: Manager -> Key -> Maybe Seed -> Int -> Double -> Double -> Int -> IO (Maybe ([Double], Int))
- genWithSeedStrings :: Manager -> Key -> Maybe Seed -> Bool -> Int -> Int -> [Char] -> IO (Maybe ([Text], Int))
- genWithSeedUUIDs :: Manager -> Key -> Maybe Seed -> Int -> IO (Maybe ([UUID], Int))
- genWithSeedBlobs :: Manager -> Key -> Maybe Seed -> Int -> Int -> BlobFormat -> IO (Maybe ([Blob], Int))
- genWithSeedIntegers' :: Manager -> Key -> Maybe Seed -> Bool -> Int -> Int -> Int -> IO (Either ClientError (RndResponse [Int]))
- genWithSeedIntegerSequences' :: Manager -> Key -> Maybe Seed -> Bool -> Int -> Int -> Int -> Int -> IO (Either ClientError (RndResponse [[Int]]))
- genWithSeedIntegerSequencesMultiform' :: Manager -> Key -> Maybe Seed -> Bool -> Int -> [Int] -> Boundary -> Boundary -> IO (Either ClientError (RndResponse [[Int]]))
- genWithSeedDecimalFractions' :: Manager -> Key -> Maybe Seed -> Bool -> Int -> Int -> IO (Either ClientError (RndResponse [Double]))
- genWithSeedGaussians' :: Manager -> Key -> Maybe Seed -> Int -> Double -> Double -> Int -> IO (Either ClientError (RndResponse [Double]))
- genWithSeedStrings' :: Manager -> Key -> Maybe Seed -> Bool -> Int -> Int -> [Char] -> IO (Either ClientError (RndResponse [Text]))
- genWithSeedUUIDs' :: Manager -> Key -> Maybe Seed -> Int -> IO (Either ClientError (RndResponse [UUID]))
- genWithSeedBlobs' :: Manager -> Key -> Maybe Seed -> Int -> Int -> BlobFormat -> IO (Either ClientError (RndResponse [Blob]))
- genSignedIntegers :: Manager -> Key -> Maybe LicenseData -> Maybe Object -> Maybe TicketId -> Bool -> Int -> Int -> Int -> IO (ClientSigResponse [Int] GenIntegersParams)
- genSignedIntegerSequences :: Manager -> Key -> Maybe LicenseData -> Maybe Object -> Maybe TicketId -> Bool -> Int -> Int -> Int -> Int -> IO (ClientSigResponse [[Int]] GenIntegerSequencesParams)
- genSignedIntegerSequencesMultiform :: Manager -> Key -> Maybe LicenseData -> Maybe Object -> Maybe TicketId -> Bool -> Int -> [Int] -> Boundary -> Boundary -> IO (ClientSigResponse [[Int]] GenIntegerSequencesMultiformParams)
- genSignedDecimalFractions :: Manager -> Key -> Maybe LicenseData -> Maybe Object -> Maybe TicketId -> Bool -> Int -> Int -> IO (ClientSigResponse [Double] GenDecimalFractionsParams)
- genSignedGaussians :: Manager -> Key -> Maybe LicenseData -> Maybe Object -> Maybe TicketId -> Int -> Double -> Double -> Int -> IO (ClientSigResponse [Double] GenGaussiansParams)
- genSignedStrings :: Manager -> Key -> Maybe LicenseData -> Maybe Object -> Maybe TicketId -> Bool -> Int -> Int -> [Char] -> IO (ClientSigResponse [Text] GenStringsParams)
- genSignedUUIDs :: Manager -> Key -> Maybe LicenseData -> Maybe Object -> Maybe TicketId -> Int -> IO (ClientSigResponse [UUID] GenUUIDsParams)
- genSignedBlobs :: Manager -> Key -> Maybe LicenseData -> Maybe Object -> Maybe TicketId -> Int -> Int -> BlobFormat -> IO (ClientSigResponse [Blob] GenBlobsParams)
- genWithSeedSignedIntegers :: Manager -> Key -> Maybe Seed -> Maybe LicenseData -> Maybe Object -> Maybe TicketId -> Bool -> Int -> Int -> Int -> IO (ClientSigResponse [Int] GenIntegersParams)
- genWithSeedSignedIntegerSequences :: Manager -> Key -> Maybe Seed -> Maybe LicenseData -> Maybe Object -> Maybe TicketId -> Bool -> Int -> Int -> Int -> Int -> IO (ClientSigResponse [[Int]] GenIntegerSequencesParams)
- genWithSeedSignedIntegerSequencesMultiform :: Manager -> Key -> Maybe Seed -> Maybe LicenseData -> Maybe Object -> Maybe TicketId -> Bool -> Int -> [Int] -> Boundary -> Boundary -> IO (ClientSigResponse [[Int]] GenIntegerSequencesMultiformParams)
- genWithSeedSignedDecimalFractions :: Manager -> Key -> Maybe Seed -> Maybe LicenseData -> Maybe Object -> Maybe TicketId -> Bool -> Int -> Int -> IO (ClientSigResponse [Double] GenDecimalFractionsParams)
- genWithSeedSignedGaussians :: Manager -> Key -> Maybe Seed -> Maybe LicenseData -> Maybe Object -> Maybe TicketId -> Int -> Double -> Double -> Int -> IO (ClientSigResponse [Double] GenGaussiansParams)
- genWithSeedSignedStrings :: Manager -> Key -> Maybe Seed -> Maybe LicenseData -> Maybe Object -> Maybe TicketId -> Bool -> Int -> Int -> [Char] -> IO (ClientSigResponse [Text] GenStringsParams)
- genWithSeedSignedUUIDs :: Manager -> Key -> Maybe Seed -> Maybe LicenseData -> Maybe Object -> Maybe TicketId -> Int -> IO (ClientSigResponse [UUID] GenUUIDsParams)
- genWithSeedSignedBlobs :: Manager -> Key -> Maybe Seed -> Maybe LicenseData -> Maybe Object -> Maybe TicketId -> Int -> Int -> BlobFormat -> IO (ClientSigResponse [Blob] GenBlobsParams)
- getResult :: Manager -> Key -> Int -> IO (Either ClientError (JsonRpcResponse Value GetResultResponse))
- createTickets :: Manager -> Key -> Int -> Bool -> IO [TicketResponse]
- createTickets' :: Manager -> Key -> Int -> Bool -> IO (Either ClientError (JsonRpcResponse Value CreateTicketsResponse))
- revealTickets :: Manager -> Key -> TicketId -> IO (Maybe Int)
- revealTickets' :: Manager -> Key -> TicketId -> IO (Either ClientError (JsonRpcResponse Value RevealTicketsResponse))
- listTickets :: Manager -> Key -> TicketType -> IO [TicketInfoResponse]
- listTickets' :: Manager -> Key -> TicketType -> IO (Either ClientError (JsonRpcResponse Value [TicketInfoResponse]))
- getTicket :: Manager -> TicketId -> IO (Maybe TicketInfoResponse)
- getTicket' :: Manager -> TicketId -> IO (Either ClientError (JsonRpcResponse Value TicketInfoResponse))
- verifySignedResponse :: (ToJSON a, ToJSON b) => Manager -> SignedRandomResponse a b -> IO (Maybe Bool)
- verifySignedResponse' :: (ToJSON a, ToJSON b) => Manager -> SignedRandomResponse a b -> IO (Either ClientError (JsonRpcResponse Value VerifySignatureResponse))
- getUsage :: Manager -> Key -> IO (Maybe UsageResponse)
- getUsage' :: Manager -> Key -> IO (Either ClientError (JsonRpcResponse Value UsageResponse))
- newtype Key = Key {
- unKey :: ByteString
- data Seed
- data MkSeedError
- mkSeedfromDate :: Day -> Day -> Either MkSeedError Seed
- mkSeedFromId :: Text -> Either MkSeedError Seed
- data Boundary
- newtype Blob = Blob {
- unBlob :: ByteString
- data BlobFormat
- data RandomResponse a = RandomResponse {
- randomData :: a
- completionTime :: UTCTime
- bitsUsed :: Int
- bitsLeft :: Int
- requestsLeft :: Int
- advisoryDelay :: Int
- type RndResponse a = JsonRpcResponse Value (RandomResponse a)
- data UsageResponse = UsageResponse {}
- data Status
- data ApiKey
- data Method
- newtype LicenseData = LicenseData {}
- data CurrencyAmount = CurrencyAmount {}
- data Currency
- data TicketResponse = TicketResponse {}
- data TicketData = TicketData {}
- newtype TicketId = TicketId {}
- data TicketType
- newtype Signature = Signature {}
- data SignedRandomResponse a b = SignedRandomResponse {
- randomResponse :: RandomResponse a
- method :: Method
- params :: b
- license :: Object
- licenseData :: Maybe LicenseData
- userData :: Maybe Object
- ticketData :: Maybe TicketData
- serialNumber :: Int
- signature :: Signature
- cost :: CurrencyAmount
- data GenIntegersParams = GenIntegersParams {
- gip_apiKey :: ApiKey
- gip_n :: Int
- gip_min :: Int
- gip_max :: Int
- gip_replacement :: Bool
- gip_base :: Int
- gip_pregeneratedRandomization :: Maybe Seed
- data GenIntegerSequencesParams = GenIntegerSequencesParams {}
- data GenIntegerSequencesMultiformParams = GenIntegerSequencesMultiformParams {}
- data GenDecimalFractionsParams = GenDecimalFractionsParams {}
- data GenGaussiansParams = GenGaussiansParams {}
- data GenStringsParams = GenStringsParams {}
- data GenUUIDsParams = GenUUIDsParams {}
- data GenBlobsParams = GenBlobsParams {}
- type ClientSigResponse a b = Either ClientError (SigRndResponse a b)
- data GetResultResponse
- = Integers (SignedRandomResponse [Int] GenIntegersParams)
- | IntegerSequences (SignedRandomResponse [[Int]] GenIntegerSequencesParams)
- | IntegerSequencesMultiform (SignedRandomResponse [[Int]] GenIntegerSequencesMultiformParams)
- | DecimalFractions (SignedRandomResponse [Double] GenDecimalFractionsParams)
- | Gaussians (SignedRandomResponse [Double] GenGaussiansParams)
- | Strings (SignedRandomResponse [Text] GenStringsParams)
- | UUIDs (SignedRandomResponse [UUID] GenUUIDsParams)
- | Blobs (SignedRandomResponse [Blob] GenBlobsParams)
- newtype CreateTicketsResponse = CreateTicketsResponse [TicketResponse]
- newtype RevealTicketsResponse = RevealTicketsResponse Int
- data TicketInfoResponse = TicketInfoResponse {}
- newtype VerifySignatureResponse = VerifySignatureResponse {}
- type SigRndResponse a b = JsonRpcResponse Value (SignedRandomResponse a b)
The Basic API
For each API method yielding random data there are four functions. For example:
The functions with and without a prime character differ in the type of the value they yield. This can be simple:
IO (Maybe (a, Int))
where the second value of the tuple represents the advised delay in milliseconds before next calling the API, or complex:
IO (Either ClientError (JsonRpcResponse Value (RandomResponse a)))
The type synonym RndResponse
is used to simplify the type signatures
of the complex functions:
type RndResponse a = JsonRpcResponse Value (RandomResponse a)
The genWithSeed...
functions are more general, taking an optional seed
which, if specified, causes the API to use pregenerated noise.
genIntegers mgr key == genWithSeedIntegers mgr key Nothing
genIntegers' mgr key == genWithSeedIntegers' mgr key Nothing
Certain optional API parameters (base
, default 10
) are not
implemented.
Simple functions yielding random data
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Bool | With replacement? |
-> Int | The number of integers requested. Must be in the range [1, 10,000]. |
-> Int | The lower boundary for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> Int | The upper boundary for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> IO (Maybe ([Int], Int)) |
This method generates true random integers within a user-defined range. If successful, the function yields the random data and the advised delay in milliseconds.
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Bool | With replacement? |
-> Int | The number of sequences requested. Must be in the range [1, 10,000]. |
-> Int | The length of the sequence. Must be in the range [1, 10,000]. |
-> Int | The lower boundary for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> Int | The upper boundary for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> IO (Maybe ([[Int]], Int)) |
This method generates sequences of true random integers within a user-defined range. If successful, the function yields the random data and the advised delay in milliseconds.
genIntegerSequencesMultiform Source #
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Bool | With replacment? |
-> Int | The number of sequences requested. Must be in the range [1, 10,000]. |
-> [Int] | The lengths of the sequences. Each must be in the range [1, 10,000]. |
-> Boundary | The lower boundary (or boundaries) for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> Boundary | The upper boundary (or boundaries) for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> IO (Maybe ([[Int]], Int)) |
This method generates multiform sequences of true random integers within a user-defined range. If successful, the function yields the random data and the advised delay in milliseconds.
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Bool | With replacement? |
-> Int | The number of decimal fractions requested. Must be in the range [1, 10,000]. |
-> Int | The number of decimal places. Must be within the range [1, 14]. |
-> IO (Maybe ([Double], Int)) |
This method generates true random decimal fractions from a uniform distribution across the interval [0, 1) with a user-defined number of decimal places. If successful, the function yields the random data and the advised delay in milliseconds.
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Int | The number of random numbers requested. Must be in the range [1, 10,000]. |
-> Double | The mean. Must be in the range [-1,000,000, 1,000,000]. |
-> Double | The standard deviation. Must be in the range [-1,000,000, 1,000,000]. |
-> Int | The number of significant digits. Must be within the range [2, 14]. |
-> IO (Maybe ([Double], Int)) |
This method generates true random numbers from a Gaussian distribution (also known as a normal distribution). The method uses a Box-Muller Transform to generate the Gaussian distribution from uniformly distributed numbers. If successful, the function yields the random data and the advised delay in milliseconds.
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Bool | With replacement? |
-> Int | The number of random strings requested. Must be in the range [1, 10,000]. |
-> Int | The length of each string. Must be in the range [1, 32]. |
-> [Char] | The set of characters that are allowed to occur in the random strings. The maximum number of characters is 128. |
-> IO (Maybe ([Text], Int)) |
This method generates true random strings. If successful, the function yields the random data and the advised delay in milliseconds.
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Int | The number of random UUIDs requested. Must be in the range [1, 10,000]. |
-> IO (Maybe ([UUID], Int)) |
This method generates true random version 4 Universally Unique IDentifiers (UUIDs) in accordance with section 4.4 of RFC 4122. If successful, the function yields the random data and the advised delay in milliseconds.
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Int | The number of random BLOBs requested. Must be in the range [1, 100]. |
-> Int | The size of each blob, measured in bytes. Must be in the range [1, 131,072]. |
-> BlobFormat | The format of the BLOBs. |
-> IO (Maybe ([Blob], Int)) |
This method generates true random Binary Large OBjects (BLOBs). The total size of all BLOBs requested must not exceed 131,072 bytes (128 kilobytes). If successful, the function yields the random data and the advised delay in milliseconds.
Complex functions yielding random data
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Bool | With replacement? |
-> Int | The number of integers requested. Must be in the range [1, 10,000]. |
-> Int | The lower boundary for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> Int | The upper boundary for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> IO (Either ClientError (RndResponse [Int])) |
This method generates true random integers within a user-defined range.
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Bool | With replacement? |
-> Int | The number of sequences requested. Must be in the range [1, 10,000]. |
-> Int | The length of the sequence. Must be in the range [1, 10,000]. |
-> Int | The lower boundary for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> Int | The upper boundary for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> IO (Either ClientError (RndResponse [[Int]])) |
This method generates sequences of true random integers within a user-defined range.
genIntegerSequencesMultiform' Source #
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Bool | With replacement? |
-> Int | The number of sequences requested. Must be in the range [1, 10,000]. |
-> [Int] | The lengths of the sequences. Each must be in the range [1, 10,000]. |
-> Boundary | The lower boundary (or boundaries) for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> Boundary | The upper boundary (or boundaries) for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> IO (Either ClientError (RndResponse [[Int]])) |
This method generates multiform sequences of true random integers within a user-defined range.
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Bool | With replacement? |
-> Int | The number of decimal fractions requested. Must be in the range [1, 10,000]. |
-> Int | The number of decimal places. Must be within the range [1, 14]. |
-> IO (Either ClientError (RndResponse [Double])) |
This method generates true random decimal fractions from a uniform distribution across the interval [0, 1) with a user-defined number of decimal places.
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Int | The number of random numbers requested. Must be in the range [1, 10,000]. |
-> Double | The mean. Must be in the range [-1,000,000, 1,000,000]. |
-> Double | The standard deviation. Must be in the range [-1,000,000, 1,000,000]. |
-> Int | The number of significant digits. Must be within the range [2, 14]. |
-> IO (Either ClientError (RndResponse [Double])) |
This method generates true random numbers from a Gaussian distribution (also known as a normal distribution). The method uses a Box-Muller Transform to generate the Gaussian distribution from uniformly distributed numbers.
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Bool | With replacement? |
-> Int | The number of random strings requested. Must be in the range [1, 10,000]. |
-> Int | The length of each string. Must be in the range [1, 32]. |
-> [Char] | The set of characters that are allowed to occur in the random strings. The maximum number of characters is 128. |
-> IO (Either ClientError (RndResponse [Text])) |
This method generates true random strings.
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Int | The number of random UUIDs requested. Must be in the range [1, 10,000]. |
-> IO (Either ClientError (RndResponse [UUID])) |
This method generates true random version 4 Universally Unique IDentifiers (UUIDs) in accordance with section 4.4 of RFC 4122.
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Int | The number of random BLOBs requested. Must be in the range [1, 100]. |
-> Int | The size of each blob, measured in bytes (not bits). Must be in the range [1, 131,072]. |
-> BlobFormat | The format of the BLOBs. |
-> IO (Either ClientError (RndResponse [Blob])) |
This method generates true random Binary Large OBjects (BLOBs). The total size of all BLOBs requested must not exceed 131,072 bytes (128 kilobytes).
Simple functions yielding random data, maybe from pregenerated randomization
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe Seed | The optional seed. |
-> Bool | With replacement? |
-> Int | The number of integers requested. Must be in the range [1, 10,000]. |
-> Int | The lower boundary for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> Int | The upper boundary for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> IO (Maybe ([Int], Int)) |
This method generates true random integers within a user-defined range. If successful, the function yields the random data and the advised delay in milliseconds.
genWithSeedIntegerSequences Source #
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe Seed | The optional seed. |
-> Bool | With replacement? |
-> Int | The number of sequences requested. Must be in the range [1, 10,000]. |
-> Int | The length of the sequence. Must be in the range [1, 10,000]. |
-> Int | The lower boundary for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> Int | The upper boundary for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> IO (Maybe ([[Int]], Int)) |
This method generates sequences of true random integers within a user-defined range. If successful, the function yields the random data and the advised delay in milliseconds.
genWithSeedIntegerSequencesMultiform Source #
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe Seed | The optional seed. |
-> Bool | With replacement? |
-> Int | The number of sequences requested. Must be in the range [1, 10,000]. |
-> [Int] | The lengths of the sequences. Each must be in the range [1, 10,000]. |
-> Boundary | The lower boundary (or boundaries) for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> Boundary | The upper boundary (or boundaries) for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> IO (Maybe ([[Int]], Int)) |
This method generates multiform sequences of true random integers within a user-defined range. If successful, the function yields the random data and the advised delay in milliseconds.
genWithSeedDecimalFractions Source #
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe Seed | The seed. |
-> Bool | With replacement? |
-> Int | The number of decimal fractions requested. Must be in the range [1, 10,000]. |
-> Int | The number of decimal places. Must be within the range [1, 14]. |
-> IO (Maybe ([Double], Int)) |
This method generates true random decimal fractions from a uniform distribution across the interval [0, 1) with a user-defined number of decimal places. If successful, the function yields the random data and the advised delay in milliseconds.
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe Seed | The optional seed. |
-> Int | The number of random numbers requested. Must be in the range [1, 10,000]. |
-> Double | The mean. Must be in the range [-1,000,000, 1,000,000]. |
-> Double | The standard deviation. Must be in the range [-1,000,000, 1,000,000]. |
-> Int | The number of significant digits. Must be within the range [2, 14]. |
-> IO (Maybe ([Double], Int)) |
This method generates true random numbers from a Gaussian distribution (also known as a normal distribution). The method uses a Box-Muller Transform to generate the Gaussian distribution from uniformly distributed numbers. If successful, the function yields the random data and the advised delay in milliseconds.
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe Seed | The optional seed. |
-> Bool | With replacement? |
-> Int | The number of random strings requested. Must be in the range [1, 10,000]. |
-> Int | The length of each string. Must be in the range [1, 32]. |
-> [Char] | The set of characters that are allowed to occur in the random strings. The maximum number of characters is 128. |
-> IO (Maybe ([Text], Int)) |
This method generates true random strings. If successful, the function yields the random data and the advised delay in milliseconds.
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe Seed | The optional seed. |
-> Int | The number of random UUIDs requested. Must be in the range [1, 10,000]. |
-> IO (Maybe ([UUID], Int)) |
This method generates true random version 4 Universally Unique IDentifiers (UUIDs) in accordance with section 4.4 of RFC 4122. If successful, the function yields the random data and the advised delay in milliseconds.
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe Seed | The optional seed. |
-> Int | The number of random BLOBs requested. Must be in the range [1, 100]. |
-> Int | The size of each blob, measured in bytes. Must be in the range [1, 131,072]. |
-> BlobFormat | The format of the BLOBs. |
-> IO (Maybe ([Blob], Int)) |
This method generates true random Binary Large OBjects (BLOBs). The total size of all BLOBs requested must not exceed 131,072 bytes (128 kilobytes). If successful, the function yields the random data and the advised delay in milliseconds.
Complex functions yielding random data, maybe from pregenerated randomization
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe Seed | The optional seed. |
-> Bool | With replacement? |
-> Int | The number of integers requested. Must be in the range [1, 10,000]. |
-> Int | The lower boundary for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> Int | The upper boundary for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> IO (Either ClientError (RndResponse [Int])) |
This method generates true random integers within a user-defined range.
genWithSeedIntegerSequences' Source #
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe Seed | The optional seed. |
-> Bool | With replacement? |
-> Int | The number of sequences requested. Must be in the range [1, 10,000]. |
-> Int | The length of the sequence. Must be in the range [1, 10,000]. |
-> Int | The lower boundary for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> Int | The upper boundary for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> IO (Either ClientError (RndResponse [[Int]])) |
This method generates sequences of true random integers within a user-defined range.
genWithSeedIntegerSequencesMultiform' Source #
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe Seed | The optional seed. |
-> Bool | With replacement? |
-> Int | The number of sequences requested. Must be in the range [1, 10,000]. |
-> [Int] | The lengths of the sequences. Each must be in the range [1, 10,000]. |
-> Boundary | The lower boundary (or boundaries) for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> Boundary | The upper boundary (or boundaries) for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> IO (Either ClientError (RndResponse [[Int]])) |
This method generates multiform sequences of true random integers within a user-defined range.
genWithSeedDecimalFractions' Source #
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe Seed | The optional seed. |
-> Bool | With replacement? |
-> Int | The number of decimal fractions requested. Must be in the range [1, 10,000]. |
-> Int | The number of decimal places. Must be within the range [1, 14]. |
-> IO (Either ClientError (RndResponse [Double])) |
This method generates true random decimal fractions from a uniform distribution across the interval [0, 1) with a user-defined number of decimal places.
genWithSeedGaussians' Source #
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe Seed | The optional seed. |
-> Int | The number of random numbers requested. Must be in the range [1, 10,000]. |
-> Double | The mean. Must be in the range [-1,000,000, 1,000,000]. |
-> Double | The standard deviation. Must be in the range [-1,000,000, 1,000,000]. |
-> Int | The number of significant digits. Must be within the range [2, 14]. |
-> IO (Either ClientError (RndResponse [Double])) |
This method generates true random numbers from a Gaussian distribution (also known as a normal distribution). The method uses a Box-Muller Transform to generate the Gaussian distribution from uniformly distributed numbers.
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe Seed | The optional seed. |
-> Bool | With replacement? |
-> Int | The number of random strings requested. Must be in the range [1, 10,000]. |
-> Int | The length of each string. Must be in the range [1, 32]. |
-> [Char] | The set of characters that are allowed to occur in the random strings. The maximum number of characters is 128. |
-> IO (Either ClientError (RndResponse [Text])) |
This method generates true random strings.
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe Seed | The optional seed. |
-> Int | The number of random UUIDs requested. Must be in the range [1, 10,000]. |
-> IO (Either ClientError (RndResponse [UUID])) |
This method generates true random version 4 Universally Unique IDentifiers (UUIDs) in accordance with section 4.4 of RFC 4122.
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe Seed | The optional seed. |
-> Int | The number of random BLOBs requested. Must be in the range [1, 100]. |
-> Int | The size of each blob, measured in bytes (not bits). Must be in the range [1, 131,072]. |
-> BlobFormat | The format of the BLOBs. |
-> IO (Either ClientError (RndResponse [Blob])) |
This method generates true random Binary Large OBjects (BLOBs). The total size of all BLOBs requested must not exceed 131,072 bytes (128 kilobytes).
The Signed API
For each API method yielding random data there are two functions. For example:
The genWithSeed...
functions are more general, taking an optional seed
which, if specified, causes the API to use pregenerated noise.
genIntegers mgr key == genWithSeedIntegers mgr key Nothing
genIntegers' mgr key == genWithSeedIntegers' mgr key Nothing
The type synonym SigRndResponse
is used to simplify the type signatures
of the functions:
type SigRndResponse a b = JsonRpcResponse Value (SignedRandomResponse a b)
Certain optional API parameters (base
, default 10
) are not
implemented.
Functions yielding signed random data
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe LicenseData | Data, if any, of relevance to the license that is associated with the API key. |
-> Maybe Object | Optional user data to be included in the signed response. |
-> Maybe TicketId | Optional unique ticket ID. Can be used only once. |
-> Bool | With replacement? |
-> Int | The number of integers requested. Must be in the range [1, 10,000]. |
-> Int | The lower boundary for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> Int | The upper boundary for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> IO (ClientSigResponse [Int] GenIntegersParams) |
This method generates true random integers within a user-defined range.
genSignedIntegerSequences Source #
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe LicenseData | Data, if any, of relevance to the license that is associated with the API key. |
-> Maybe Object | Optional user data to be included in the signed response. |
-> Maybe TicketId | Optional unique ticket ID. Can be used only once. |
-> Bool | With replacement? |
-> Int | The number of sequences requested. Must be in the range [1, 10,000]. |
-> Int | The length of the sequence. Must be in the range [1, 10,000]. |
-> Int | The lower boundary for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> Int | The upper boundary for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> IO (ClientSigResponse [[Int]] GenIntegerSequencesParams) |
This method generates sequences of true random integers within a user-defined range.
genSignedIntegerSequencesMultiform Source #
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe LicenseData | Data, if any, of relevance to the license that is associated with the API key. |
-> Maybe Object | Optional user data to be included in the signed response. |
-> Maybe TicketId | Optional unique ticket ID. Can be used only once. |
-> Bool | With replacement? |
-> Int | The number of sequences requested. Must be in the range [1, 10,000]. |
-> [Int] | The lengths of the sequences. Each must be in the range [1, 10,000]. |
-> Boundary | The lower boundary (or boundaries) for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> Boundary | The upper boundary (or boundaries) for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> IO (ClientSigResponse [[Int]] GenIntegerSequencesMultiformParams) |
This method generates multiform sequences of true random integers within a user-defined range.
genSignedDecimalFractions Source #
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe LicenseData | Data, if any, of relevance to the license that is associated with the API key. |
-> Maybe Object | Optional user data to be included in the signed response. |
-> Maybe TicketId | Optional unique ticket ID. Can be used only once. |
-> Bool | With replacement? |
-> Int | The number of decimal fractions requested. Must be in the range [1, 10,000]. |
-> Int | The number of decimal places. Must be within the range [1, 14]. |
-> IO (ClientSigResponse [Double] GenDecimalFractionsParams) |
This method generates true random decimal fractions from a uniform distribution across the interval [0, 1) with a user-defined number of decimal places.
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe LicenseData | Data, if any, of relevance to the license that is associated with the API key. |
-> Maybe Object | Optional user data to be included in the signed response. |
-> Maybe TicketId | Optional unique ticket ID. Can be used only once. |
-> Int | The number of random numbers requested. Must be in the range [1, 10,000]. |
-> Double | The mean. Must be in the range [-1,000,000, 1,000,000]. |
-> Double | The standard deviation. Must be in the range [-1,000,000, 1,000,000]. |
-> Int | The number of significant digits. Must be within the range [2, 14]. |
-> IO (ClientSigResponse [Double] GenGaussiansParams) |
This method generates true random numbers from a Gaussian distribution (also known as a normal distribution). The method uses a Box-Muller Transform to generate the Gaussian distribution from uniformly distributed numbers.
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe LicenseData | Data, if any, of relevance to the license that is associated with the API key. |
-> Maybe Object | Optional user data to be included in the signed response. |
-> Maybe TicketId | Optional unique ticket ID. Can be used only once. |
-> Bool | With replacement? |
-> Int | The number of random strings requested. Must be in the range [1, 10,000]. |
-> Int | The length of each string. Must be in the range [1, 32]. |
-> [Char] | The set of characters that are allowed to occur in the random strings. The maximum number of characters is 128. |
-> IO (ClientSigResponse [Text] GenStringsParams) |
This method generates true random strings.
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe LicenseData | Data, if any, of relevance to the license that is associated with the API key. |
-> Maybe Object | Optional user data to be included in the signed response. |
-> Maybe TicketId | Optional unique ticket ID. Can be used only once. |
-> Int | The number of random UUIDs requested. Must be in the range [1, 10,000]. |
-> IO (ClientSigResponse [UUID] GenUUIDsParams) |
This method generates true random version 4 Universally Unique IDentifiers (UUIDs) in accordance with section 4.4 of RFC 4122.
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe LicenseData | Data, if any, of relevance to the license that is associated with the API key. |
-> Maybe Object | Optional user data to be included in the signed response. |
-> Maybe TicketId | Optional unique ticket ID. Can be used only once. |
-> Int | The number of random BLOBs requested. Must be in the range [1, 100]. |
-> Int | The size of each blob, measured in bytes (not bits). Must be in the range [1, 131,072]. |
-> BlobFormat | The format of the BLOBs. |
-> IO (ClientSigResponse [Blob] GenBlobsParams) |
This method generates true random Binary Large OBjects (BLOBs). The total size of all BLOBs requested must not exceed 131,072 bytes (128 kilobytes).
Functions yielding signed random data, maybe from pregenerated randomization
genWithSeedSignedIntegers Source #
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe Seed | The optional seed. |
-> Maybe LicenseData | Data, if any, of relevance to the license that is associated with the API key. |
-> Maybe Object | Optional user data to be included in the signed response. |
-> Maybe TicketId | Optional unique ticket ID. Can be used only once. |
-> Bool | With replacement? |
-> Int | The number of integers requested. Must be in the range [1, 10,000]. |
-> Int | The lower boundary for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> Int | The upper boundary for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> IO (ClientSigResponse [Int] GenIntegersParams) |
This method generates true random integers within a user-defined range.
genWithSeedSignedIntegerSequences Source #
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe Seed | |
-> Maybe LicenseData | Data, if any, of relevance to the license that is associated with the API key. |
-> Maybe Object | Optional user data to be included in the signed response. |
-> Maybe TicketId | Optional unique ticket ID. Can be used only once. |
-> Bool | With replacement? |
-> Int | The number of sequences requested. Must be in the range [1, 10,000]. |
-> Int | The length of the sequence. Must be in the range [1, 10,000]. |
-> Int | The lower boundary for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> Int | The upper boundary for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> IO (ClientSigResponse [[Int]] GenIntegerSequencesParams) |
This method generates sequences of true random integers within a user-defined range.
genWithSeedSignedIntegerSequencesMultiform Source #
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe Seed | The optional seed. |
-> Maybe LicenseData | Data, if any, of relevance to the license that is associated with the API key. |
-> Maybe Object | Optional user data to be included in the signed response. |
-> Maybe TicketId | Optional unique ticket ID. Can be used only once. |
-> Bool | With replacement? |
-> Int | The number of sequences requested. Must be in the range [1, 10,000]. |
-> [Int] | The lengths of the sequences. Each must be in the range [1, 10,000]. |
-> Boundary | The lower boundary (or boundaries) for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> Boundary | The upper boundary (or boundaries) for the range from which the random integers will be picked. Must be within the range [-1,000,000,000, 1,000,000,000]. |
-> IO (ClientSigResponse [[Int]] GenIntegerSequencesMultiformParams) |
This method generates multiform sequences of true random integers within a user-defined range.
genWithSeedSignedDecimalFractions Source #
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe Seed | The optional seed. |
-> Maybe LicenseData | Data, if any, of relevance to the license that is associated with the API key. |
-> Maybe Object | Optional user data to be included in the signed response. |
-> Maybe TicketId | Optional unique ticket ID. Can be used only once. |
-> Bool | With replacement? |
-> Int | The number of decimal fractions requested. Must be in the range [1, 10,000]. |
-> Int | The number of decimal places. Must be within the range [1, 14]. |
-> IO (ClientSigResponse [Double] GenDecimalFractionsParams) |
This method generates true random decimal fractions from a uniform distribution across the interval [0, 1) with a user-defined number of decimal places.
genWithSeedSignedGaussians Source #
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe Seed | The optional seed. |
-> Maybe LicenseData | Data, if any, of relevance to the license that is associated with the API key. |
-> Maybe Object | Optional user data to be included in the signed response. |
-> Maybe TicketId | Optional unique ticket ID. Can be used only once. |
-> Int | The number of random numbers requested. Must be in the range [1, 10,000]. |
-> Double | The mean. Must be in the range [-1,000,000, 1,000,000]. |
-> Double | The standard deviation. Must be in the range [-1,000,000, 1,000,000]. |
-> Int | The number of significant digits. Must be within the range [2, 14]. |
-> IO (ClientSigResponse [Double] GenGaussiansParams) |
This method generates true random numbers from a Gaussian distribution (also known as a normal distribution). The method uses a Box-Muller Transform to generate the Gaussian distribution from uniformly distributed numbers.
genWithSeedSignedStrings Source #
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe Seed | The optional seed. |
-> Maybe LicenseData | Data, if any, of relevance to the license that is associated with the API key. |
-> Maybe Object | Optional user data to be included in the signed response. |
-> Maybe TicketId | Optional unique ticket ID. Can be used only once. |
-> Bool | With replacement? |
-> Int | The number of random strings requested. Must be in the range [1, 10,000]. |
-> Int | The length of each string. Must be in the range [1, 32]. |
-> [Char] | The set of characters that are allowed to occur in the random strings. The maximum number of characters is 128. |
-> IO (ClientSigResponse [Text] GenStringsParams) |
This method generates true random strings.
genWithSeedSignedUUIDs Source #
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe Seed | The optional seed. |
-> Maybe LicenseData | Data, if any, of relevance to the license that is associated with the API key. |
-> Maybe Object | Optional user data to be included in the signed response. |
-> Maybe TicketId | Optional unique ticket ID. Can be used only once. |
-> Int | The number of random UUIDs requested. Must be in the range [1, 10,000]. |
-> IO (ClientSigResponse [UUID] GenUUIDsParams) |
This method generates true random version 4 Universally Unique IDentifiers (UUIDs) in accordance with section 4.4 of RFC 4122.
genWithSeedSignedBlobs Source #
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Maybe Seed | The optional seed. |
-> Maybe LicenseData | Data, if any, of relevance to the license that is associated with the API key. |
-> Maybe Object | Optional user data to be included in the signed response. |
-> Maybe TicketId | Optional unique ticket ID. Can be used only once. |
-> Int | The number of random BLOBs requested. Must be in the range [1, 100]. |
-> Int | The size of each blob, measured in bytes (not bits). Must be in the range [1, 131,072]. |
-> BlobFormat | The format of the BLOBs. |
-> IO (ClientSigResponse [Blob] GenBlobsParams) |
This method generates true random Binary Large OBjects (BLOBs). The total size of all BLOBs requested must not exceed 131,072 bytes (128 kilobytes).
Functions related to serial numbers
Arguments
:: Manager | The connection manager. |
-> Key | The API key. |
-> Int | The serial number. |
-> IO (Either ClientError (JsonRpcResponse Value GetResultResponse)) |
Retrieve a previously generated result from its serial number.
Functions related to tickets
Arguments
:: Manager | The connection manager. |
-> Key | The API key |
-> Int | The number of tickets requested. Must be in the range [1, 50]. |
-> Bool | Make full information about the ticket available? |
-> IO [TicketResponse] |
Create unique tickets for use with the Signed API.
Arguments
:: Manager | The connection manager. |
-> Key | The API key |
-> Int | The number of tickets requested. Must be in the range [1, 50]. |
-> Bool | Make full information about the ticket available? |
-> IO (Either ClientError (JsonRpcResponse Value CreateTicketsResponse)) |
Create unique tickets for use with the Signed API.
Arguments
:: Manager | The connection manager. |
-> Key | The API key |
-> TicketId | The ticketId to reveal. |
-> IO (Maybe Int) |
This method enables other methods to reveal greater information about the given ticket.
Arguments
:: Manager | The connection manager. |
-> Key | The API key |
-> TicketId | The ticketId to reveal. |
-> IO (Either ClientError (JsonRpcResponse Value RevealTicketsResponse)) |
This method enables other methods to reveal greater information about the given ticket.
Arguments
:: Manager | The connection manager. |
-> Key | The API key |
-> TicketType | The type of tickets to obtain information about. |
-> IO [TicketInfoResponse] |
This method enables other methods to reveal greater information about the given ticket.
Arguments
:: Manager | The connection manager. |
-> Key | The API key |
-> TicketType | The type of tickets to obtain information about. |
-> IO (Either ClientError (JsonRpcResponse Value [TicketInfoResponse])) |
This method enables other methods to reveal greater information about the given ticket.
Arguments
:: Manager | The connection manager. |
-> TicketId | The ticket to obtain information about. |
-> IO (Maybe TicketInfoResponse) |
This method yields information about the given ticket.
Arguments
:: Manager | The connection manager. |
-> TicketId | The ticket to obtain information about. |
-> IO (Either ClientError (JsonRpcResponse Value TicketInfoResponse)) |
This method yields information about the given ticket.
Functions related to verification
Arguments
:: (ToJSON a, ToJSON b) | |
=> Manager | The connection manager. |
-> SignedRandomResponse a b | The ticket to obtain information about. |
-> IO (Maybe Bool) |
This method verifies a response from the Signed API.
verifySignedResponse' Source #
Arguments
:: (ToJSON a, ToJSON b) | |
=> Manager | The connection mannager. |
-> SignedRandomResponse a b | The ticket to obtain information about. |
-> IO (Either ClientError (JsonRpcResponse Value VerifySignatureResponse)) |
This method verifies a response from the Signed API.
Usage of the Core API
Arguments
:: Manager | The connection manager. |
-> Key | The API key |
-> IO (Maybe UsageResponse) |
This method returns information related to the usage of a given API key.
Arguments
:: Manager | The connection manager. |
-> Key | The API key |
-> IO (Either ClientError (JsonRpcResponse Value UsageResponse)) |
This method returns information related to the usage of a given API key.
Types and type synonyms
The Core API
Type representing API keys.
Constructors
Key | |
Fields
|
Type representing 'seeds' used to generate random data from historical, pregenerated randomization.
Instances
FromJSON Seed Source # | |
ToJSON Seed Source # | |
Defined in System.Random.Atmospheric.Api | |
Generic Seed Source # | |
Show Seed Source # | |
Eq Seed Source # | |
type Rep Seed Source # | |
Defined in System.Random.Atmospheric.Api type Rep Seed = D1 ('MetaData "Seed" "System.Random.Atmospheric.Api" "RandomDotOrg-1.0-1aeFaPjtCgQEK3hoeMx3xR" 'False) (C1 ('MetaCons "DateSeed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day)) :+: C1 ('MetaCons "IdSeed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) |
data MkSeedError Source #
Type representing errors form mkSeedFromId
.
Instances
Show MkSeedError Source # | |
Defined in System.Random.Atmospheric.Api Methods showsPrec :: Int -> MkSeedError -> ShowS # show :: MkSeedError -> String # showList :: [MkSeedError] -> ShowS # | |
Eq MkSeedError Source # | |
Defined in System.Random.Atmospheric.Api |
Arguments
:: Day | The current date (not verified). |
-> Day | A past date or the current date. |
-> Either MkSeedError Seed |
Construct a seed from a date. Given the current date, checks that the date is a past date or the current date.
mkSeedFromId :: Text -> Either MkSeedError Seed Source #
Construct a seed from an id. Checks that the id is between 1 to 64 characters in length.
Type representing boundaries of multiform generateIntegerSequences
.
Constructors
Fixed Int | Fixed boundary for all sequences. |
Multiform [Int] | List of boundaries for each sequence. |
Instances
FromJSON Boundary Source # | |
ToJSON Boundary Source # | |
Defined in System.Random.Atmospheric.Api | |
Generic Boundary Source # | |
Show Boundary Source # | |
Eq Boundary Source # | |
type Rep Boundary Source # | |
Defined in System.Random.Atmospheric.Api type Rep Boundary = D1 ('MetaData "Boundary" "System.Random.Atmospheric.Api" "RandomDotOrg-1.0-1aeFaPjtCgQEK3hoeMx3xR" 'False) (C1 ('MetaCons "Fixed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :+: C1 ('MetaCons "Multiform" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Int]))) |
Type representing Binary Large OBjects (BLOBs).
Constructors
Blob | |
Fields
|
data BlobFormat Source #
Type representing BLOB formats.
Instances
FromJSON BlobFormat Source # | |
Defined in System.Random.Atmospheric.Api | |
ToJSON BlobFormat Source # | |
Defined in System.Random.Atmospheric.Api Methods toJSON :: BlobFormat -> Value # toEncoding :: BlobFormat -> Encoding # toJSONList :: [BlobFormat] -> Value # toEncodingList :: [BlobFormat] -> Encoding # | |
Generic BlobFormat Source # | |
Defined in System.Random.Atmospheric.Api Associated Types type Rep BlobFormat :: Type -> Type # | |
Show BlobFormat Source # | |
Defined in System.Random.Atmospheric.Api Methods showsPrec :: Int -> BlobFormat -> ShowS # show :: BlobFormat -> String # showList :: [BlobFormat] -> ShowS # | |
Eq BlobFormat Source # | |
Defined in System.Random.Atmospheric.Api | |
type Rep BlobFormat Source # | |
Defined in System.Random.Atmospheric.Api type Rep BlobFormat = D1 ('MetaData "BlobFormat" "System.Random.Atmospheric.Api" "RandomDotOrg-1.0-1aeFaPjtCgQEK3hoeMx3xR" 'False) (C1 ('MetaCons "Base64" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Hex" 'PrefixI 'False) (U1 :: Type -> Type)) |
data RandomResponse a Source #
Type representing responses from methods of the Basic API yielding random data.
Constructors
RandomResponse | |
Fields
|
Instances
FromJSON a => FromJSON (RandomResponse a) Source # | |
Defined in System.Random.Atmospheric.Api Methods parseJSON :: Value -> Parser (RandomResponse a) # parseJSONList :: Value -> Parser [RandomResponse a] # | |
Show a => Show (RandomResponse a) Source # | |
Defined in System.Random.Atmospheric.Api Methods showsPrec :: Int -> RandomResponse a -> ShowS # show :: RandomResponse a -> String # showList :: [RandomResponse a] -> ShowS # | |
Eq a => Eq (RandomResponse a) Source # | |
Defined in System.Random.Atmospheric.Api Methods (==) :: RandomResponse a -> RandomResponse a -> Bool # (/=) :: RandomResponse a -> RandomResponse a -> Bool # |
type RndResponse a = JsonRpcResponse Value (RandomResponse a) Source #
Type synonym to simplify type signatures defining responses from the Basic API.
data UsageResponse Source #
Type representing responses from the method of the Basic and Signed API yielding information about the API usage.
Constructors
UsageResponse | |
Fields
|
Instances
FromJSON UsageResponse Source # | |
Defined in System.Random.Atmospheric.Api Methods parseJSON :: Value -> Parser UsageResponse # parseJSONList :: Value -> Parser [UsageResponse] # | |
Generic UsageResponse Source # | |
Defined in System.Random.Atmospheric.Api Associated Types type Rep UsageResponse :: Type -> Type # | |
Show UsageResponse Source # | |
Defined in System.Random.Atmospheric.Api Methods showsPrec :: Int -> UsageResponse -> ShowS # show :: UsageResponse -> String # showList :: [UsageResponse] -> ShowS # | |
Eq UsageResponse Source # | |
Defined in System.Random.Atmospheric.Api Methods (==) :: UsageResponse -> UsageResponse -> Bool # (/=) :: UsageResponse -> UsageResponse -> Bool # | |
type Rep UsageResponse Source # | |
Defined in System.Random.Atmospheric.Api type Rep UsageResponse = D1 ('MetaData "UsageResponse" "System.Random.Atmospheric.Api" "RandomDotOrg-1.0-1aeFaPjtCgQEK3hoeMx3xR" 'False) (C1 ('MetaCons "UsageResponse" 'PrefixI 'True) ((S1 ('MetaSel ('Just "ur_status") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Status) :*: (S1 ('MetaSel ('Just "ur_creationTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UTCTime) :*: S1 ('MetaSel ('Just "ur_bitsLeft") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))) :*: (S1 ('MetaSel ('Just "ur_requestsLeft") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: (S1 ('MetaSel ('Just "ur_totalBits") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "ur_totalRequests") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))))) |
Type representing the statuses of API keys.
The Signed API only
Type representing API keys or hashed API keys.
Constructors
HashedApiKey ByteString | |
ApiKey Key |
Instances
Type representing methods of the Signed API generating random data.
Constructors
GenerateSignedIntegers | |
GenerateSignedIntegerSequences | |
GenerateSignedDecimalFractions | |
GenerateSignedGaussians | |
GenerateSignedStrings | |
GenerateSignedUUIDs | |
GenerateSignedBlobs |
Instances
FromJSON Method Source # | |
ToJSON Method Source # | |
Defined in System.Random.Atmospheric.Api | |
Generic Method Source # | |
Show Method Source # | |
Eq Method Source # | |
type Rep Method Source # | |
Defined in System.Random.Atmospheric.Api type Rep Method = D1 ('MetaData "Method" "System.Random.Atmospheric.Api" "RandomDotOrg-1.0-1aeFaPjtCgQEK3hoeMx3xR" 'False) ((C1 ('MetaCons "GenerateSignedIntegers" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "GenerateSignedIntegerSequences" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GenerateSignedDecimalFractions" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "GenerateSignedGaussians" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GenerateSignedStrings" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "GenerateSignedUUIDs" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GenerateSignedBlobs" 'PrefixI 'False) (U1 :: Type -> Type)))) |
newtype LicenseData Source #
Type representing data required by the Signed API for certain licences.
Constructors
LicenseData | |
Fields |
Instances
data CurrencyAmount Source #
Type representing monetary amounts.
Constructors
CurrencyAmount | |
Fields
|
Instances
Type representing currencies recognised by the Signed API.
Constructors
USD | United State dollar |
EUR | Euro |
GBP | British pound |
BTC | Bitcoin cryptocurrency |
ETH | Ether cryptocurrency |
Instances
FromJSON Currency Source # | |
ToJSON Currency Source # | |
Defined in System.Random.Atmospheric.Api | |
Generic Currency Source # | |
Show Currency Source # | |
Eq Currency Source # | |
type Rep Currency Source # | |
Defined in System.Random.Atmospheric.Api type Rep Currency = D1 ('MetaData "Currency" "System.Random.Atmospheric.Api" "RandomDotOrg-1.0-1aeFaPjtCgQEK3hoeMx3xR" 'False) ((C1 ('MetaCons "USD" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EUR" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "GBP" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "BTC" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ETH" 'PrefixI 'False) (U1 :: Type -> Type)))) |
data TicketResponse Source #
Type representing ticket responses from the Signed API.
Constructors
TicketResponse | |
Fields |
Instances
FromJSON TicketResponse Source # | |
Defined in System.Random.Atmospheric.Api Methods parseJSON :: Value -> Parser TicketResponse # parseJSONList :: Value -> Parser [TicketResponse] # | |
Show TicketResponse Source # | |
Defined in System.Random.Atmospheric.Api Methods showsPrec :: Int -> TicketResponse -> ShowS # show :: TicketResponse -> String # showList :: [TicketResponse] -> ShowS # | |
Eq TicketResponse Source # | |
Defined in System.Random.Atmospheric.Api Methods (==) :: TicketResponse -> TicketResponse -> Bool # (/=) :: TicketResponse -> TicketResponse -> Bool # |
data TicketData Source #
Type representing data about tickets.
Constructors
TicketData | |
Fields
|
Instances
FromJSON TicketData Source # | |
Defined in System.Random.Atmospheric.Api | |
ToJSON TicketData Source # | |
Defined in System.Random.Atmospheric.Api Methods toJSON :: TicketData -> Value # toEncoding :: TicketData -> Encoding # toJSONList :: [TicketData] -> Value # toEncodingList :: [TicketData] -> Encoding # | |
Generic TicketData Source # | |
Defined in System.Random.Atmospheric.Api Associated Types type Rep TicketData :: Type -> Type # | |
Show TicketData Source # | |
Defined in System.Random.Atmospheric.Api Methods showsPrec :: Int -> TicketData -> ShowS # show :: TicketData -> String # showList :: [TicketData] -> ShowS # | |
Eq TicketData Source # | |
Defined in System.Random.Atmospheric.Api | |
type Rep TicketData Source # | |
Defined in System.Random.Atmospheric.Api type Rep TicketData = D1 ('MetaData "TicketData" "System.Random.Atmospheric.Api" "RandomDotOrg-1.0-1aeFaPjtCgQEK3hoeMx3xR" 'False) (C1 ('MetaCons "TicketData" 'PrefixI 'True) (S1 ('MetaSel ('Just "td_ticketId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TicketId) :*: (S1 ('MetaSel ('Just "td_previousTicketId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe TicketId)) :*: S1 ('MetaSel ('Just "td_nextTicketId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe TicketId))))) |
Type representing the IDs of unique single-use tickets.
Constructors
TicketId | |
Fields |
data TicketType Source #
Type representing types of tickets to list.
Constructors
Singleton | No previous or next tickets. |
Head | No previous ticket but next ticket. |
Tail | Previous ticket but no next ticket. |
Instances
ToJSON TicketType Source # | |
Defined in System.Random.Atmospheric.Api Methods toJSON :: TicketType -> Value # toEncoding :: TicketType -> Encoding # toJSONList :: [TicketType] -> Value # toEncodingList :: [TicketType] -> Encoding # | |
Generic TicketType Source # | |
Defined in System.Random.Atmospheric.Api Associated Types type Rep TicketType :: Type -> Type # | |
Show TicketType Source # | |
Defined in System.Random.Atmospheric.Api Methods showsPrec :: Int -> TicketType -> ShowS # show :: TicketType -> String # showList :: [TicketType] -> ShowS # | |
Eq TicketType Source # | |
Defined in System.Random.Atmospheric.Api | |
type Rep TicketType Source # | |
Defined in System.Random.Atmospheric.Api type Rep TicketType = D1 ('MetaData "TicketType" "System.Random.Atmospheric.Api" "RandomDotOrg-1.0-1aeFaPjtCgQEK3hoeMx3xR" 'False) (C1 ('MetaCons "Singleton" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Head" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Tail" 'PrefixI 'False) (U1 :: Type -> Type))) |
Type representing signatures.
Constructors
Signature | |
Fields |
data SignedRandomResponse a b Source #
Type representing responses from methods of the Signed API yielding random data.
Constructors
SignedRandomResponse | |
Fields
|
Instances
(FromJSON a, FromJSON b) => FromJSON (SignedRandomResponse a b) Source # | |
Defined in System.Random.Atmospheric.Api Methods parseJSON :: Value -> Parser (SignedRandomResponse a b) # parseJSONList :: Value -> Parser [SignedRandomResponse a b] # | |
(Show a, Show b) => Show (SignedRandomResponse a b) Source # | |
Defined in System.Random.Atmospheric.Api Methods showsPrec :: Int -> SignedRandomResponse a b -> ShowS # show :: SignedRandomResponse a b -> String # showList :: [SignedRandomResponse a b] -> ShowS # | |
(Eq a, Eq b) => Eq (SignedRandomResponse a b) Source # | |
Defined in System.Random.Atmospheric.Api Methods (==) :: SignedRandomResponse a b -> SignedRandomResponse a b -> Bool # (/=) :: SignedRandomResponse a b -> SignedRandomResponse a b -> Bool # |
data GenIntegersParams Source #
Type representing parameters to the generateIntegers API method.
Constructors
GenIntegersParams | |
Fields
|
Instances
FromJSON GenIntegersParams Source # | |
Defined in System.Random.Atmospheric.Api Methods parseJSON :: Value -> Parser GenIntegersParams # parseJSONList :: Value -> Parser [GenIntegersParams] # | |
ToJSON GenIntegersParams Source # | |
Defined in System.Random.Atmospheric.Api Methods toJSON :: GenIntegersParams -> Value # toEncoding :: GenIntegersParams -> Encoding # toJSONList :: [GenIntegersParams] -> Value # toEncodingList :: [GenIntegersParams] -> Encoding # | |
Generic GenIntegersParams Source # | |
Defined in System.Random.Atmospheric.Api Associated Types type Rep GenIntegersParams :: Type -> Type # Methods from :: GenIntegersParams -> Rep GenIntegersParams x # to :: Rep GenIntegersParams x -> GenIntegersParams # | |
Show GenIntegersParams Source # | |
Defined in System.Random.Atmospheric.Api Methods showsPrec :: Int -> GenIntegersParams -> ShowS # show :: GenIntegersParams -> String # showList :: [GenIntegersParams] -> ShowS # | |
Eq GenIntegersParams Source # | |
Defined in System.Random.Atmospheric.Api Methods (==) :: GenIntegersParams -> GenIntegersParams -> Bool # (/=) :: GenIntegersParams -> GenIntegersParams -> Bool # | |
type Rep GenIntegersParams Source # | |
Defined in System.Random.Atmospheric.Api type Rep GenIntegersParams = D1 ('MetaData "GenIntegersParams" "System.Random.Atmospheric.Api" "RandomDotOrg-1.0-1aeFaPjtCgQEK3hoeMx3xR" 'False) (C1 ('MetaCons "GenIntegersParams" 'PrefixI 'True) ((S1 ('MetaSel ('Just "gip_apiKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ApiKey) :*: (S1 ('MetaSel ('Just "gip_n") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "gip_min") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))) :*: ((S1 ('MetaSel ('Just "gip_max") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "gip_replacement") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "gip_base") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "gip_pregeneratedRandomization") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Seed)))))) |
data GenIntegerSequencesParams Source #
Type representing parameters to the generateIntegerSequences API method.
Constructors
GenIntegerSequencesParams | |
Fields
|
Instances
FromJSON GenIntegerSequencesParams Source # | |
Defined in System.Random.Atmospheric.Api Methods parseJSON :: Value -> Parser GenIntegerSequencesParams # parseJSONList :: Value -> Parser [GenIntegerSequencesParams] # | |
ToJSON GenIntegerSequencesParams Source # | |
Defined in System.Random.Atmospheric.Api Methods toJSON :: GenIntegerSequencesParams -> Value # toEncoding :: GenIntegerSequencesParams -> Encoding # toJSONList :: [GenIntegerSequencesParams] -> Value # | |
Generic GenIntegerSequencesParams Source # | |
Defined in System.Random.Atmospheric.Api Associated Types type Rep GenIntegerSequencesParams :: Type -> Type # Methods from :: GenIntegerSequencesParams -> Rep GenIntegerSequencesParams x # to :: Rep GenIntegerSequencesParams x -> GenIntegerSequencesParams # | |
Show GenIntegerSequencesParams Source # | |
Defined in System.Random.Atmospheric.Api Methods showsPrec :: Int -> GenIntegerSequencesParams -> ShowS # show :: GenIntegerSequencesParams -> String # showList :: [GenIntegerSequencesParams] -> ShowS # | |
Eq GenIntegerSequencesParams Source # | |
Defined in System.Random.Atmospheric.Api Methods (==) :: GenIntegerSequencesParams -> GenIntegerSequencesParams -> Bool # (/=) :: GenIntegerSequencesParams -> GenIntegerSequencesParams -> Bool # | |
type Rep GenIntegerSequencesParams Source # | |
Defined in System.Random.Atmospheric.Api type Rep GenIntegerSequencesParams = D1 ('MetaData "GenIntegerSequencesParams" "System.Random.Atmospheric.Api" "RandomDotOrg-1.0-1aeFaPjtCgQEK3hoeMx3xR" 'False) (C1 ('MetaCons "GenIntegerSequencesParams" 'PrefixI 'True) (((S1 ('MetaSel ('Just "gisp_apiKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ApiKey) :*: S1 ('MetaSel ('Just "gisp_n") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "gisp_length") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "gisp_min") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))) :*: ((S1 ('MetaSel ('Just "gisp_max") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "gisp_replacement") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "gisp_base") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "gisp_pregeneratedRandomization") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Seed)))))) |
data GenIntegerSequencesMultiformParams Source #
Type representing parameters to the generateIntegerSequences API method for multiform sequences.
Constructors
GenIntegerSequencesMultiformParams | |
Fields
|
Instances
FromJSON GenIntegerSequencesMultiformParams Source # | |
Defined in System.Random.Atmospheric.Api Methods parseJSON :: Value -> Parser GenIntegerSequencesMultiformParams # parseJSONList :: Value -> Parser [GenIntegerSequencesMultiformParams] # | |
ToJSON GenIntegerSequencesMultiformParams Source # | |
Defined in System.Random.Atmospheric.Api | |
Generic GenIntegerSequencesMultiformParams Source # | |
Defined in System.Random.Atmospheric.Api Associated Types type Rep GenIntegerSequencesMultiformParams :: Type -> Type # | |
Show GenIntegerSequencesMultiformParams Source # | |
Defined in System.Random.Atmospheric.Api Methods showsPrec :: Int -> GenIntegerSequencesMultiformParams -> ShowS # show :: GenIntegerSequencesMultiformParams -> String # showList :: [GenIntegerSequencesMultiformParams] -> ShowS # | |
Eq GenIntegerSequencesMultiformParams Source # | |
type Rep GenIntegerSequencesMultiformParams Source # | |
Defined in System.Random.Atmospheric.Api type Rep GenIntegerSequencesMultiformParams = D1 ('MetaData "GenIntegerSequencesMultiformParams" "System.Random.Atmospheric.Api" "RandomDotOrg-1.0-1aeFaPjtCgQEK3hoeMx3xR" 'False) (C1 ('MetaCons "GenIntegerSequencesMultiformParams" 'PrefixI 'True) (((S1 ('MetaSel ('Just "gismp_apiKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ApiKey) :*: S1 ('MetaSel ('Just "gismp_n") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "gismp_length") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Int]) :*: S1 ('MetaSel ('Just "gismp_min") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Boundary))) :*: ((S1 ('MetaSel ('Just "gismp_max") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Boundary) :*: S1 ('MetaSel ('Just "gismp_replacement") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "gismp_base") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "gismp_pregeneratedRandomization") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Seed)))))) |
data GenDecimalFractionsParams Source #
Type representing parameters to the generateDecimalFractions
API method.
Constructors
GenDecimalFractionsParams | |
Fields |
Instances
data GenGaussiansParams Source #
Type representing parameters to the generateGaussianss
API method.
Constructors
GenGaussiansParams | |
Fields |
Instances
FromJSON GenGaussiansParams Source # | |
Defined in System.Random.Atmospheric.Api Methods parseJSON :: Value -> Parser GenGaussiansParams # parseJSONList :: Value -> Parser [GenGaussiansParams] # | |
ToJSON GenGaussiansParams Source # | |
Defined in System.Random.Atmospheric.Api Methods toJSON :: GenGaussiansParams -> Value # toEncoding :: GenGaussiansParams -> Encoding # toJSONList :: [GenGaussiansParams] -> Value # toEncodingList :: [GenGaussiansParams] -> Encoding # | |
Generic GenGaussiansParams Source # | |
Defined in System.Random.Atmospheric.Api Associated Types type Rep GenGaussiansParams :: Type -> Type # Methods from :: GenGaussiansParams -> Rep GenGaussiansParams x # to :: Rep GenGaussiansParams x -> GenGaussiansParams # | |
Show GenGaussiansParams Source # | |
Defined in System.Random.Atmospheric.Api Methods showsPrec :: Int -> GenGaussiansParams -> ShowS # show :: GenGaussiansParams -> String # showList :: [GenGaussiansParams] -> ShowS # | |
Eq GenGaussiansParams Source # | |
Defined in System.Random.Atmospheric.Api Methods (==) :: GenGaussiansParams -> GenGaussiansParams -> Bool # (/=) :: GenGaussiansParams -> GenGaussiansParams -> Bool # | |
type Rep GenGaussiansParams Source # | |
Defined in System.Random.Atmospheric.Api type Rep GenGaussiansParams = D1 ('MetaData "GenGaussiansParams" "System.Random.Atmospheric.Api" "RandomDotOrg-1.0-1aeFaPjtCgQEK3hoeMx3xR" 'False) (C1 ('MetaCons "GenGaussiansParams" 'PrefixI 'True) ((S1 ('MetaSel ('Just "ggp_apiKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ApiKey) :*: (S1 ('MetaSel ('Just "ggp_n") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "ggp_mean") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double))) :*: (S1 ('MetaSel ('Just "ggp_standardDeviation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double) :*: (S1 ('MetaSel ('Just "ggp_significantDigits") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "ggp_pregeneratedRandomization") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Seed)))))) |
data GenStringsParams Source #
Type representing parameters to the generateStrings
API method.
Constructors
GenStringsParams | |
Fields
|
Instances
FromJSON GenStringsParams Source # | |
Defined in System.Random.Atmospheric.Api Methods parseJSON :: Value -> Parser GenStringsParams # parseJSONList :: Value -> Parser [GenStringsParams] # | |
ToJSON GenStringsParams Source # | |
Defined in System.Random.Atmospheric.Api Methods toJSON :: GenStringsParams -> Value # toEncoding :: GenStringsParams -> Encoding # toJSONList :: [GenStringsParams] -> Value # toEncodingList :: [GenStringsParams] -> Encoding # | |
Generic GenStringsParams Source # | |
Defined in System.Random.Atmospheric.Api Associated Types type Rep GenStringsParams :: Type -> Type # Methods from :: GenStringsParams -> Rep GenStringsParams x # to :: Rep GenStringsParams x -> GenStringsParams # | |
Show GenStringsParams Source # | |
Defined in System.Random.Atmospheric.Api Methods showsPrec :: Int -> GenStringsParams -> ShowS # show :: GenStringsParams -> String # showList :: [GenStringsParams] -> ShowS # | |
Eq GenStringsParams Source # | |
Defined in System.Random.Atmospheric.Api Methods (==) :: GenStringsParams -> GenStringsParams -> Bool # (/=) :: GenStringsParams -> GenStringsParams -> Bool # | |
type Rep GenStringsParams Source # | |
Defined in System.Random.Atmospheric.Api type Rep GenStringsParams = D1 ('MetaData "GenStringsParams" "System.Random.Atmospheric.Api" "RandomDotOrg-1.0-1aeFaPjtCgQEK3hoeMx3xR" 'False) (C1 ('MetaCons "GenStringsParams" 'PrefixI 'True) ((S1 ('MetaSel ('Just "gsp_apiKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ApiKey) :*: (S1 ('MetaSel ('Just "gsp_n") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "gsp_length") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))) :*: (S1 ('MetaSel ('Just "gsp_characters") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Char]) :*: (S1 ('MetaSel ('Just "gsp_replacement") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "gsp_pregeneratedRandomization") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Seed)))))) |
data GenUUIDsParams Source #
Type representing parameters to the generateUUIDs
API method.
Constructors
GenUUIDsParams | |
Fields |
Instances
data GenBlobsParams Source #
Type representing parameters to the generateBlobs
API method.
Constructors
GenBlobsParams | |
Fields
|
Instances
FromJSON GenBlobsParams Source # | |
Defined in System.Random.Atmospheric.Api Methods parseJSON :: Value -> Parser GenBlobsParams # parseJSONList :: Value -> Parser [GenBlobsParams] # | |
ToJSON GenBlobsParams Source # | |
Defined in System.Random.Atmospheric.Api Methods toJSON :: GenBlobsParams -> Value # toEncoding :: GenBlobsParams -> Encoding # toJSONList :: [GenBlobsParams] -> Value # toEncodingList :: [GenBlobsParams] -> Encoding # | |
Generic GenBlobsParams Source # | |
Defined in System.Random.Atmospheric.Api Associated Types type Rep GenBlobsParams :: Type -> Type # Methods from :: GenBlobsParams -> Rep GenBlobsParams x # to :: Rep GenBlobsParams x -> GenBlobsParams # | |
Show GenBlobsParams Source # | |
Defined in System.Random.Atmospheric.Api Methods showsPrec :: Int -> GenBlobsParams -> ShowS # show :: GenBlobsParams -> String # showList :: [GenBlobsParams] -> ShowS # | |
Eq GenBlobsParams Source # | |
Defined in System.Random.Atmospheric.Api Methods (==) :: GenBlobsParams -> GenBlobsParams -> Bool # (/=) :: GenBlobsParams -> GenBlobsParams -> Bool # | |
type Rep GenBlobsParams Source # | |
Defined in System.Random.Atmospheric.Api type Rep GenBlobsParams = D1 ('MetaData "GenBlobsParams" "System.Random.Atmospheric.Api" "RandomDotOrg-1.0-1aeFaPjtCgQEK3hoeMx3xR" 'False) (C1 ('MetaCons "GenBlobsParams" 'PrefixI 'True) ((S1 ('MetaSel ('Just "gbp_apiKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ApiKey) :*: S1 ('MetaSel ('Just "gbp_n") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "gbp_size") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: (S1 ('MetaSel ('Just "gbp_format") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BlobFormat) :*: S1 ('MetaSel ('Just "gbp_pregeneratedRandomization") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Seed)))))) |
type ClientSigResponse a b = Either ClientError (SigRndResponse a b) Source #
Type synonym to simplify type signatures defining responses from the Signed API.
data GetResultResponse Source #
Types representing responses from the getResult
API method.
Constructors
Instances
FromJSON GetResultResponse Source # | |
Defined in System.Random.Atmospheric.Api Methods parseJSON :: Value -> Parser GetResultResponse # parseJSONList :: Value -> Parser [GetResultResponse] # | |
Generic GetResultResponse Source # | |
Defined in System.Random.Atmospheric.Api Associated Types type Rep GetResultResponse :: Type -> Type # Methods from :: GetResultResponse -> Rep GetResultResponse x # to :: Rep GetResultResponse x -> GetResultResponse # | |
Show GetResultResponse Source # | |
Defined in System.Random.Atmospheric.Api Methods showsPrec :: Int -> GetResultResponse -> ShowS # show :: GetResultResponse -> String # showList :: [GetResultResponse] -> ShowS # | |
Eq GetResultResponse Source # | |
Defined in System.Random.Atmospheric.Api Methods (==) :: GetResultResponse -> GetResultResponse -> Bool # (/=) :: GetResultResponse -> GetResultResponse -> Bool # | |
type Rep GetResultResponse Source # | |
Defined in System.Random.Atmospheric.Api type Rep GetResultResponse = D1 ('MetaData "GetResultResponse" "System.Random.Atmospheric.Api" "RandomDotOrg-1.0-1aeFaPjtCgQEK3hoeMx3xR" 'False) (((C1 ('MetaCons "Integers" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SignedRandomResponse [Int] GenIntegersParams))) :+: C1 ('MetaCons "IntegerSequences" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SignedRandomResponse [[Int]] GenIntegerSequencesParams)))) :+: (C1 ('MetaCons "IntegerSequencesMultiform" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SignedRandomResponse [[Int]] GenIntegerSequencesMultiformParams))) :+: C1 ('MetaCons "DecimalFractions" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SignedRandomResponse [Double] GenDecimalFractionsParams))))) :+: ((C1 ('MetaCons "Gaussians" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SignedRandomResponse [Double] GenGaussiansParams))) :+: C1 ('MetaCons "Strings" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SignedRandomResponse [Text] GenStringsParams)))) :+: (C1 ('MetaCons "UUIDs" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SignedRandomResponse [UUID] GenUUIDsParams))) :+: C1 ('MetaCons "Blobs" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SignedRandomResponse [Blob] GenBlobsParams)))))) |
newtype CreateTicketsResponse Source #
Type representing responses from the method of the Signed API yielding new tickets.
Constructors
CreateTicketsResponse [TicketResponse] |
Instances
newtype RevealTicketsResponse Source #
Type representing responses from the method of the Signed API revealing tickets.
Constructors
RevealTicketsResponse Int |
Instances
FromJSON RevealTicketsResponse Source # | |
Defined in System.Random.Atmospheric.Api Methods parseJSON :: Value -> Parser RevealTicketsResponse # parseJSONList :: Value -> Parser [RevealTicketsResponse] # | |
Show RevealTicketsResponse Source # | |
Defined in System.Random.Atmospheric.Api Methods showsPrec :: Int -> RevealTicketsResponse -> ShowS # show :: RevealTicketsResponse -> String # showList :: [RevealTicketsResponse] -> ShowS # | |
Eq RevealTicketsResponse Source # | |
Defined in System.Random.Atmospheric.Api Methods (==) :: RevealTicketsResponse -> RevealTicketsResponse -> Bool # (/=) :: RevealTicketsResponse -> RevealTicketsResponse -> Bool # |
data TicketInfoResponse Source #
Type representing responses from the listTickets
or getTicket
API
methods.
Constructors
TicketInfoResponse | |
Fields |
Instances
FromJSON TicketInfoResponse Source # | |
Defined in System.Random.Atmospheric.Api Methods parseJSON :: Value -> Parser TicketInfoResponse # parseJSONList :: Value -> Parser [TicketInfoResponse] # | |
Show TicketInfoResponse Source # | |
Defined in System.Random.Atmospheric.Api Methods showsPrec :: Int -> TicketInfoResponse -> ShowS # show :: TicketInfoResponse -> String # showList :: [TicketInfoResponse] -> ShowS # | |
Eq TicketInfoResponse Source # | |
Defined in System.Random.Atmospheric.Api Methods (==) :: TicketInfoResponse -> TicketInfoResponse -> Bool # (/=) :: TicketInfoResponse -> TicketInfoResponse -> Bool # |
newtype VerifySignatureResponse Source #
Type representing responses from the verifySignature
API method.
Constructors
VerifySignatureResponse | |
Fields |
Instances
type SigRndResponse a b = JsonRpcResponse Value (SignedRandomResponse a b) Source #
Type synonym to simplify type signatures defining responses from the Signed API.