Safe Haskell | None |
---|---|
Language | Haskell2010 |
- class Show c => IsCondition c where
- type Message = ByteString
- type Fulfillment = ByteString
- type Preimage = ByteString
- type Prefix = ByteString
- type Fingerprint = ByteString
- encodeCondition :: IsCondition c => c -> ByteString
- getConditionASN :: IsCondition c => c -> [ASN1]
- getConditionURI :: IsCondition c => c -> Text
- encodeFulfillment :: IsCondition c => c -> Maybe Fulfillment
- encodeFulfillmentBase64 :: IsCondition c => c -> Maybe Text
- decodeFulfillment :: IsCondition c => Fulfillment -> Either String c
- decodeFulfillmentBase64 :: IsCondition c => Fulfillment -> Either String c
- decodeCondition :: IsCondition c => ByteString -> Either String c
- parsePoly :: IsCondition c => ParseASN1 c
- validate :: IsCondition c => Text -> c -> Message -> Bool
- parseCondition :: IsCondition c => ParseASN1 c
- data ConditionType = CT {}
- typeNames :: Set ConditionType -> Text
- preimageType :: ConditionType
- preimageFulfillmentASN :: ByteString -> [ASN1]
- preimageCost :: ByteString -> Int
- preimageFingerprint :: Preimage -> Fingerprint
- parsePreimage :: (Preimage -> c) -> ParseASN1 c
- verifyPreimage :: Preimage -> Message -> Bool
- prefixType :: ConditionType
- prefixCost :: IsCondition c => Prefix -> Int -> c -> Int
- prefixFingerprint :: IsCondition c => Prefix -> Int -> c -> Fingerprint
- prefixFulfillmentASN :: IsCondition c => Prefix -> Int -> c -> Maybe [ASN1]
- prefixSubtypes :: IsCondition c => c -> Set ConditionType
- parsePrefix :: IsCondition c => (Prefix -> Int -> c -> c) -> ParseASN1 c
- verifyPrefix :: IsCondition c => Prefix -> Int -> c -> Message -> Bool
- thresholdType :: ConditionType
- thresholdFulfillmentASN :: IsCondition c => Word16 -> [c] -> Maybe [ASN1]
- thresholdFingerprint :: IsCondition c => Word16 -> [c] -> Fingerprint
- thresholdFingerprintFromAsns :: Word16 -> [[ASN1]] -> Fingerprint
- thresholdSubtypes :: IsCondition c => [c] -> Set ConditionType
- thresholdCost :: IsCondition c => Word16 -> [c] -> Int
- parseThreshold :: IsCondition c => (Word16 -> [c] -> c) -> ParseASN1 c
- verifyThreshold :: IsCondition c => Word16 -> [c] -> Message -> Bool
- ed25519Type :: ConditionType
- ed25519Cost :: Int
- ed25519Fingerprint :: PublicKey -> Fingerprint
- ed25519FulfillmentASN :: PublicKey -> Signature -> [ASN1]
- parseEd25519 :: (PublicKey -> Signature -> c) -> ParseASN1 c
- verifyEd25519 :: PublicKey -> Signature -> Message -> Bool
- sha256 :: ByteArrayAccess a => a -> ByteString
- hashASN :: [ASN1] -> Fingerprint
- withContainerContext :: (Int -> ParseASN1 a) -> ParseASN1 a
- parseContainer :: Int -> ParseASN1 a -> ParseASN1 a
- parseOther :: Int -> ParseASN1 ByteString
Documentation
class Show c => IsCondition c where Source #
Class of things that are conditions
getCost, getType, getFingerprint, getFulfillmentASN, getSubtypes, parseFulfillment, verifyMessage, anon
getType :: c -> ConditionType Source #
getFingerprint :: c -> Fingerprint Source #
getFulfillmentASN :: c -> Maybe [ASN1] Source #
getSubtypes :: c -> Set ConditionType Source #
parseFulfillment :: Int -> ParseASN1 c Source #
verifyMessage :: c -> Message -> Bool Source #
type Message = ByteString Source #
type Fulfillment = ByteString Source #
type Preimage = ByteString Source #
type Prefix = ByteString Source #
type Fingerprint = ByteString Source #
encodeCondition :: IsCondition c => c -> ByteString Source #
getConditionASN :: IsCondition c => c -> [ASN1] Source #
getConditionURI :: IsCondition c => c -> Text Source #
encodeFulfillment :: IsCondition c => c -> Maybe Fulfillment Source #
encodeFulfillmentBase64 :: IsCondition c => c -> Maybe Text Source #
decodeFulfillment :: IsCondition c => Fulfillment -> Either String c Source #
decodeFulfillmentBase64 :: IsCondition c => Fulfillment -> Either String c Source #
decodeCondition :: IsCondition c => ByteString -> Either String c Source #
parsePoly :: IsCondition c => ParseASN1 c Source #
parseCondition :: IsCondition c => ParseASN1 c Source #
data ConditionType Source #
Type of a condition
preimageType :: ConditionType Source #
- Preimage Condition
preimageFulfillmentASN :: ByteString -> [ASN1] Source #
preimageCost :: ByteString -> Int Source #
parsePreimage :: (Preimage -> c) -> ParseASN1 c Source #
verifyPreimage :: Preimage -> Message -> Bool Source #
The preimage is assumed to be correct if it has been provided; it'll show up during URI comparison if it's wrong.
prefixType :: ConditionType Source #
- Prefix condition
prefixCost :: IsCondition c => Prefix -> Int -> c -> Int Source #
prefixFingerprint :: IsCondition c => Prefix -> Int -> c -> Fingerprint Source #
prefixFulfillmentASN :: IsCondition c => Prefix -> Int -> c -> Maybe [ASN1] Source #
prefixSubtypes :: IsCondition c => c -> Set ConditionType Source #
parsePrefix :: IsCondition c => (Prefix -> Int -> c -> c) -> ParseASN1 c Source #
verifyPrefix :: IsCondition c => Prefix -> Int -> c -> Message -> Bool Source #
thresholdType :: ConditionType Source #
- Threshold condition
thresholdFulfillmentASN :: IsCondition c => Word16 -> [c] -> Maybe [ASN1] Source #
thresholdFingerprint :: IsCondition c => Word16 -> [c] -> Fingerprint Source #
thresholdFingerprintFromAsns :: Word16 -> [[ASN1]] -> Fingerprint Source #
thresholdSubtypes :: IsCondition c => [c] -> Set ConditionType Source #
thresholdCost :: IsCondition c => Word16 -> [c] -> Int Source #
parseThreshold :: IsCondition c => (Word16 -> [c] -> c) -> ParseASN1 c Source #
verifyThreshold :: IsCondition c => Word16 -> [c] -> Message -> Bool Source #
ed25519Type :: ConditionType Source #
- RSA-SHA256 Condition
- ED25519-SHA256 Condition
ed25519Cost :: Int Source #
sha256 :: ByteArrayAccess a => a -> ByteString Source #
hashASN :: [ASN1] -> Fingerprint Source #
parseOther :: Int -> ParseASN1 ByteString Source #