| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
PlutusTx.Builtins
Description
Primitive names and functions for working with Plutus Core builtins.
Synopsis
- data BuiltinByteString
- appendByteString :: BuiltinByteString -> BuiltinByteString -> BuiltinByteString
- consByteString :: Integer -> BuiltinByteString -> BuiltinByteString
- sliceByteString :: Integer -> Integer -> BuiltinByteString -> BuiltinByteString
- lengthOfByteString :: BuiltinByteString -> Integer
- indexByteString :: BuiltinByteString -> Integer -> Integer
- emptyByteString :: BuiltinByteString
- equalsByteString :: BuiltinByteString -> BuiltinByteString -> Bool
- lessThanByteString :: BuiltinByteString -> BuiltinByteString -> Bool
- lessThanEqualsByteString :: BuiltinByteString -> BuiltinByteString -> Bool
- greaterThanByteString :: BuiltinByteString -> BuiltinByteString -> Bool
- greaterThanEqualsByteString :: BuiltinByteString -> BuiltinByteString -> Bool
- sha2_256 :: BuiltinByteString -> BuiltinByteString
- sha3_256 :: BuiltinByteString -> BuiltinByteString
- blake2b_224 :: BuiltinByteString -> BuiltinByteString
- blake2b_256 :: BuiltinByteString -> BuiltinByteString
- keccak_256 :: BuiltinByteString -> BuiltinByteString
- ripemd_160 :: BuiltinByteString -> BuiltinByteString
- verifyEd25519Signature :: BuiltinByteString -> BuiltinByteString -> BuiltinByteString -> Bool
- verifyEcdsaSecp256k1Signature :: BuiltinByteString -> BuiltinByteString -> BuiltinByteString -> Bool
- verifySchnorrSecp256k1Signature :: BuiltinByteString -> BuiltinByteString -> BuiltinByteString -> Bool
- decodeUtf8 :: BuiltinByteString -> BuiltinString
- newtype BuiltinByteStringHex = BuiltinByteStringHex {}
- newtype BuiltinByteStringUtf8 = BuiltinByteStringUtf8 {}
- data Integer
- addInteger :: Integer -> Integer -> Integer
- subtractInteger :: Integer -> Integer -> Integer
- multiplyInteger :: Integer -> Integer -> Integer
- divideInteger :: Integer -> Integer -> Integer
- modInteger :: Integer -> Integer -> Integer
- quotientInteger :: Integer -> Integer -> Integer
- remainderInteger :: Integer -> Integer -> Integer
- greaterThanInteger :: Integer -> Integer -> Bool
- greaterThanEqualsInteger :: Integer -> Integer -> Bool
- lessThanInteger :: Integer -> Integer -> Bool
- lessThanEqualsInteger :: Integer -> Integer -> Bool
- equalsInteger :: Integer -> Integer -> Bool
- expModInteger :: Integer -> Integer -> Integer -> Integer
- caseInteger :: Integer -> [a] -> a
- error :: () -> a
- data BuiltinData
- chooseData :: BuiltinData -> a -> a -> a -> a -> a -> a
- matchData :: BuiltinData -> (Integer -> [BuiltinData] -> r) -> ([(BuiltinData, BuiltinData)] -> r) -> ([BuiltinData] -> r) -> (Integer -> r) -> (BuiltinByteString -> r) -> r
- matchData' :: BuiltinData -> (Integer -> BuiltinList BuiltinData -> r) -> (BuiltinList (BuiltinPair BuiltinData BuiltinData) -> r) -> (BuiltinList BuiltinData -> r) -> (Integer -> r) -> (BuiltinByteString -> r) -> r
- equalsData :: BuiltinData -> BuiltinData -> Bool
- serialiseData :: BuiltinData -> BuiltinByteString
- mkConstr :: Integer -> [BuiltinData] -> BuiltinData
- mkMap :: [(BuiltinData, BuiltinData)] -> BuiltinData
- mkList :: [BuiltinData] -> BuiltinData
- mkI :: Integer -> BuiltinData
- mkB :: BuiltinByteString -> BuiltinData
- unsafeDataAsConstr :: BuiltinData -> (Integer, [BuiltinData])
- unsafeDataAsMap :: BuiltinData -> [(BuiltinData, BuiltinData)]
- unsafeDataAsList :: BuiltinData -> [BuiltinData]
- unsafeDataAsI :: BuiltinData -> Integer
- unsafeDataAsB :: BuiltinData -> BuiltinByteString
- builtinDataToData :: BuiltinData -> Data
- dataToBuiltinData :: Data -> BuiltinData
- data BuiltinString
- appendString :: BuiltinString -> BuiltinString -> BuiltinString
- emptyString :: BuiltinString
- equalsString :: BuiltinString -> BuiltinString -> Bool
- encodeUtf8 :: BuiltinString -> BuiltinByteString
- pairToPair :: BuiltinPair a b -> (a, b)
- casePair :: BuiltinPair a b -> (a -> b -> r) -> r
- mkNil :: MkNil arep => BuiltinList arep
- mkNilOpaque :: BuiltinList a
- null :: BuiltinList a -> Bool
- caseList' :: forall a r. r -> (a -> BuiltinList a -> r) -> BuiltinList a -> r
- caseList :: forall a r. (() -> r) -> (a -> BuiltinList a -> r) -> BuiltinList a -> r
- matchList :: BuiltinList a -> (() -> r) -> (a -> BuiltinList a -> r) -> r
- matchList' :: BuiltinList a -> r -> (a -> BuiltinList a -> r) -> r
- headMaybe :: BuiltinList a -> Maybe a
- head :: BuiltinList a -> a
- tail :: BuiltinList a -> BuiltinList a
- drop :: Integer -> BuiltinList a -> BuiltinList a
- uncons :: BuiltinList a -> Maybe (a, BuiltinList a)
- unsafeUncons :: BuiltinList a -> (a, BuiltinList a)
- data BuiltinArray a
- listToArray :: BuiltinList a -> BuiltinArray a
- sopListToArray :: (HasToOpaque a arep, MkNil arep) => [a] -> BuiltinArray arep
- lengthOfArray :: BuiltinArray a -> BuiltinInteger
- indexArray :: BuiltinArray a -> BuiltinInteger -> a
- trace :: BuiltinString -> a -> a
- data BuiltinBLS12_381_G1_Element
- bls12_381_G1_equals :: BuiltinBLS12_381_G1_Element -> BuiltinBLS12_381_G1_Element -> Bool
- bls12_381_G1_add :: BuiltinBLS12_381_G1_Element -> BuiltinBLS12_381_G1_Element -> BuiltinBLS12_381_G1_Element
- bls12_381_G1_scalarMul :: Integer -> BuiltinBLS12_381_G1_Element -> BuiltinBLS12_381_G1_Element
- bls12_381_G1_multiScalarMul :: [Integer] -> [BuiltinBLS12_381_G1_Element] -> BuiltinBLS12_381_G1_Element
- bls12_381_G1_neg :: BuiltinBLS12_381_G1_Element -> BuiltinBLS12_381_G1_Element
- bls12_381_G1_compress :: BuiltinBLS12_381_G1_Element -> BuiltinByteString
- bls12_381_G1_uncompress :: BuiltinByteString -> BuiltinBLS12_381_G1_Element
- bls12_381_G1_hashToGroup :: BuiltinByteString -> BuiltinByteString -> BuiltinBLS12_381_G1_Element
- bls12_381_G1_compressed_zero :: BuiltinByteString
- bls12_381_G1_compressed_generator :: BuiltinByteString
- data BuiltinBLS12_381_G2_Element
- bls12_381_G2_equals :: BuiltinBLS12_381_G2_Element -> BuiltinBLS12_381_G2_Element -> Bool
- bls12_381_G2_add :: BuiltinBLS12_381_G2_Element -> BuiltinBLS12_381_G2_Element -> BuiltinBLS12_381_G2_Element
- bls12_381_G2_scalarMul :: Integer -> BuiltinBLS12_381_G2_Element -> BuiltinBLS12_381_G2_Element
- bls12_381_G2_multiScalarMul :: [Integer] -> [BuiltinBLS12_381_G2_Element] -> BuiltinBLS12_381_G2_Element
- bls12_381_G2_neg :: BuiltinBLS12_381_G2_Element -> BuiltinBLS12_381_G2_Element
- bls12_381_G2_compress :: BuiltinBLS12_381_G2_Element -> BuiltinByteString
- bls12_381_G2_uncompress :: BuiltinByteString -> BuiltinBLS12_381_G2_Element
- bls12_381_G2_hashToGroup :: BuiltinByteString -> BuiltinByteString -> BuiltinBLS12_381_G2_Element
- bls12_381_G2_compressed_zero :: BuiltinByteString
- bls12_381_G2_compressed_generator :: BuiltinByteString
- data BuiltinBLS12_381_MlResult
- bls12_381_millerLoop :: BuiltinBLS12_381_G1_Element -> BuiltinBLS12_381_G2_Element -> BuiltinBLS12_381_MlResult
- bls12_381_mulMlResult :: BuiltinBLS12_381_MlResult -> BuiltinBLS12_381_MlResult -> BuiltinBLS12_381_MlResult
- bls12_381_finalVerify :: BuiltinBLS12_381_MlResult -> BuiltinBLS12_381_MlResult -> Bool
- fromOpaque :: HasFromOpaque arep a => arep -> a
- toOpaque :: HasToOpaque a arep => a -> arep
- useToOpaque :: a -> a
- useFromOpaque :: a -> a
- fromBuiltin :: HasFromBuiltin arep => arep -> FromBuiltin arep
- toBuiltin :: HasToBuiltin a => a -> ToBuiltin a
- data ByteOrder
- integerToByteString :: ByteOrder -> Integer -> Integer -> BuiltinByteString
- byteStringToInteger :: ByteOrder -> BuiltinByteString -> Integer
- andByteString :: Bool -> BuiltinByteString -> BuiltinByteString -> BuiltinByteString
- orByteString :: Bool -> BuiltinByteString -> BuiltinByteString -> BuiltinByteString
- xorByteString :: Bool -> BuiltinByteString -> BuiltinByteString -> BuiltinByteString
- complementByteString :: BuiltinByteString -> BuiltinByteString
- readBit :: BuiltinByteString -> Integer -> Bool
- writeBits :: BuiltinByteString -> [Integer] -> Bool -> BuiltinByteString
- replicateByte :: Integer -> Integer -> BuiltinByteString
- shiftByteString :: BuiltinByteString -> Integer -> BuiltinByteString
- rotateByteString :: BuiltinByteString -> Integer -> BuiltinByteString
- countSetBits :: BuiltinByteString -> Integer
- findFirstSetBit :: BuiltinByteString -> Integer
- insertCoin :: BuiltinByteString -> BuiltinByteString -> BuiltinInteger -> BuiltinValue -> BuiltinValue
- lookupCoin :: BuiltinByteString -> BuiltinByteString -> BuiltinValue -> Integer
- unionValue :: BuiltinValue -> BuiltinValue -> BuiltinValue
- valueContains :: BuiltinValue -> BuiltinValue -> Bool
- mkValue :: BuiltinValue -> BuiltinData
- unsafeDataAsValue :: BuiltinData -> BuiltinValue
- scaleValue :: Integer -> BuiltinValue -> BuiltinValue
Bytestring builtins
data BuiltinByteString Source #
An opaque type representing Plutus Core ByteStrings.
Instances
appendByteString :: BuiltinByteString -> BuiltinByteString -> BuiltinByteString Source #
Concatenates two ByteStrings.
consByteString :: Integer -> BuiltinByteString -> BuiltinByteString Source #
Adds a byte to the front of a ByteString.
sliceByteString :: Integer -> Integer -> BuiltinByteString -> BuiltinByteString Source #
Returns the substring of a ByteString from index start of length n.
lengthOfByteString :: BuiltinByteString -> Integer Source #
Returns the length of a ByteString.
indexByteString :: BuiltinByteString -> Integer -> Integer Source #
Returns the byte of a ByteString at index.
emptyByteString :: BuiltinByteString Source #
An empty ByteString.
equalsByteString :: BuiltinByteString -> BuiltinByteString -> Bool Source #
Check if two ByteStrings are equal.
lessThanByteString :: BuiltinByteString -> BuiltinByteString -> Bool Source #
Check if one ByteString is less than another.
lessThanEqualsByteString :: BuiltinByteString -> BuiltinByteString -> Bool Source #
Check if one ByteString is less than or equal to another.
greaterThanByteString :: BuiltinByteString -> BuiltinByteString -> Bool Source #
Check if one ByteString is greater than another.
greaterThanEqualsByteString :: BuiltinByteString -> BuiltinByteString -> Bool Source #
Check if one ByteString is greater than another.
sha2_256 :: BuiltinByteString -> BuiltinByteString Source #
The SHA2-256 hash of a ByteString
sha3_256 :: BuiltinByteString -> BuiltinByteString Source #
The SHA3-256 hash of a ByteString
blake2b_224 :: BuiltinByteString -> BuiltinByteString Source #
The BLAKE2B-224 hash of a ByteString
blake2b_256 :: BuiltinByteString -> BuiltinByteString Source #
The BLAKE2B-256 hash of a ByteString
keccak_256 :: BuiltinByteString -> BuiltinByteString Source #
The KECCAK-256 hash of a ByteString
ripemd_160 :: BuiltinByteString -> BuiltinByteString Source #
The RIPEMD-160 hash of a ByteString
verifyEd25519Signature Source #
Arguments
| :: BuiltinByteString | Public Key (32 bytes) |
| -> BuiltinByteString | Message (arbirtary length) |
| -> BuiltinByteString | Signature (64 bytes) |
| -> Bool |
Ed25519 signature verification. Verify that the signature is a signature of the message by the public key. This will fail if key or the signature are not of the expected length.
verifyEcdsaSecp256k1Signature Source #
Arguments
| :: BuiltinByteString | Verification key (33 bytes) |
| -> BuiltinByteString | Message hash (32 bytes) |
| -> BuiltinByteString | Signature (64 bytes) |
| -> Bool |
Given an ECDSA SECP256k1 verification key, an ECDSA SECP256k1 signature,
and an ECDSA SECP256k1 message hash (all as BuiltinByteStrings), verify the
hash with that key and signature.
Note
There are additional well-formation requirements for the arguments beyond their length:
- The first byte of the public key must correspond to the sign of the y
coordinate: this is
0x02if y is even, and0x03otherwise. - The remaining bytes of the public key must correspond to the x coordinate, as a big-endian integer.
- The first 32 bytes of the signature must correspond to the big-endian integer representation of _r_.
- The last 32 bytes of the signature must correspond to the big-endian integer representation of _s_.
While this primitive accepts a hash, any caller should only pass it hashes that they computed themselves: specifically, they should receive the message from a sender and hash it, rather than receiving the hash from said sender. Failure to do so can be dangerous. Other than length, we make no requirements of what hash gets used.
See also
secp256k1_ec_pubkey_serialize; this implements the format for the verification key that we accept, given a length argument of 33 and theSECP256K1_EC_COMPRESSEDflag.secp256k1_ecdsa_serialize_compact; this implements the format for the signature that we accept.
verifySchnorrSecp256k1Signature Source #
Arguments
| :: BuiltinByteString | Verification key (32 bytes) |
| -> BuiltinByteString | Message (arbitrary length) |
| -> BuiltinByteString | Signature (64 bytes) |
| -> Bool |
Given a Schnorr SECP256k1 verification key, a Schnorr SECP256k1 signature,
and a message (all as BuiltinByteStrings), verify the message with that key
and signature.
Note
There are additional well-formation requirements for the arguments beyond
their length. Throughout, we refer to co-ordinates of the point R.
- The bytes of the public key must correspond to the x coordinate, as a big-endian integer, as specified in BIP-340.
- The first 32 bytes of the signature must correspond to the x coordinate, as a big-endian integer, as specified in BIP-340.
- The last 32 bytes of the signature must correspond to the bytes of s, as a big-endian integer, as specified in BIP-340.
See also
- BIP-340
secp256k1_xonly_pubkey_serialize; this implements the format for the verification key that we accept.secp256k1_schnorrsig_sign; this implements the signing logic for signatures this builtin can verify.
decodeUtf8 :: BuiltinByteString -> BuiltinString Source #
Converts a ByteString to a String.
newtype BuiltinByteStringHex Source #
Constructors
| BuiltinByteStringHex | |
Fields | |
Instances
| IsString BuiltinByteStringHex Source # | |
Defined in PlutusTx.Builtins.HasOpaque Methods | |
| Monoid BuiltinByteStringHex Source # | |
Defined in PlutusTx.Builtins.HasOpaque | |
| Semigroup BuiltinByteStringHex Source # | |
Defined in PlutusTx.Builtins.HasOpaque Methods (<>) :: BuiltinByteStringHex -> BuiltinByteStringHex -> BuiltinByteStringHex Source # sconcat :: NonEmpty BuiltinByteStringHex -> BuiltinByteStringHex Source # stimes :: Integral b => b -> BuiltinByteStringHex -> BuiltinByteStringHex Source # | |
| Show BuiltinByteStringHex Source # | |
Defined in PlutusTx.Builtins.HasOpaque | |
| NFData BuiltinByteStringHex Source # | |
Defined in PlutusTx.Builtins.HasOpaque Methods rnf :: BuiltinByteStringHex -> () Source # | |
| Eq BuiltinByteStringHex Source # | |
Defined in PlutusTx.Builtins.HasOpaque Methods (==) :: BuiltinByteStringHex -> BuiltinByteStringHex -> Bool Source # (/=) :: BuiltinByteStringHex -> BuiltinByteStringHex -> Bool Source # | |
| Ord BuiltinByteStringHex Source # | |
Defined in PlutusTx.Builtins.HasOpaque Methods compare :: BuiltinByteStringHex -> BuiltinByteStringHex -> Ordering Source # (<) :: BuiltinByteStringHex -> BuiltinByteStringHex -> Bool Source # (<=) :: BuiltinByteStringHex -> BuiltinByteStringHex -> Bool Source # (>) :: BuiltinByteStringHex -> BuiltinByteStringHex -> Bool Source # (>=) :: BuiltinByteStringHex -> BuiltinByteStringHex -> Bool Source # max :: BuiltinByteStringHex -> BuiltinByteStringHex -> BuiltinByteStringHex Source # min :: BuiltinByteStringHex -> BuiltinByteStringHex -> BuiltinByteStringHex Source # | |
| Hashable BuiltinByteStringHex Source # | |
Defined in PlutusTx.Builtins.HasOpaque | |
| ByteArray BuiltinByteStringHex Source # | |
Defined in PlutusTx.Builtins.HasOpaque | |
| ByteArrayAccess BuiltinByteStringHex Source # | |
Defined in PlutusTx.Builtins.HasOpaque Methods length :: BuiltinByteStringHex -> Int withByteArray :: BuiltinByteStringHex -> (Ptr p -> IO a) -> IO a copyByteArrayToPtr :: BuiltinByteStringHex -> Ptr p -> IO () | |
| Pretty BuiltinByteStringHex Source # | |
Defined in PlutusTx.Builtins.HasOpaque | |
| Serialise BuiltinByteStringHex Source # | |
Defined in PlutusTx.Builtins.HasOpaque Methods encode :: BuiltinByteStringHex -> Encoding decode :: Decoder s BuiltinByteStringHex encodeList :: [BuiltinByteStringHex] -> Encoding decodeList :: Decoder s [BuiltinByteStringHex] | |
newtype BuiltinByteStringUtf8 Source #
Constructors
| BuiltinByteStringUtf8 | |
Fields | |
Instances
| IsString BuiltinByteStringUtf8 Source # | |
Defined in PlutusTx.Builtins.HasOpaque Methods | |
| Monoid BuiltinByteStringUtf8 Source # | |
Defined in PlutusTx.Builtins.HasOpaque | |
| Semigroup BuiltinByteStringUtf8 Source # | |
Defined in PlutusTx.Builtins.HasOpaque Methods (<>) :: BuiltinByteStringUtf8 -> BuiltinByteStringUtf8 -> BuiltinByteStringUtf8 Source # sconcat :: NonEmpty BuiltinByteStringUtf8 -> BuiltinByteStringUtf8 Source # stimes :: Integral b => b -> BuiltinByteStringUtf8 -> BuiltinByteStringUtf8 Source # | |
| Show BuiltinByteStringUtf8 Source # | |
Defined in PlutusTx.Builtins.HasOpaque | |
| NFData BuiltinByteStringUtf8 Source # | |
Defined in PlutusTx.Builtins.HasOpaque Methods rnf :: BuiltinByteStringUtf8 -> () Source # | |
| Eq BuiltinByteStringUtf8 Source # | |
Defined in PlutusTx.Builtins.HasOpaque Methods (==) :: BuiltinByteStringUtf8 -> BuiltinByteStringUtf8 -> Bool Source # (/=) :: BuiltinByteStringUtf8 -> BuiltinByteStringUtf8 -> Bool Source # | |
| Ord BuiltinByteStringUtf8 Source # | |
Defined in PlutusTx.Builtins.HasOpaque Methods compare :: BuiltinByteStringUtf8 -> BuiltinByteStringUtf8 -> Ordering Source # (<) :: BuiltinByteStringUtf8 -> BuiltinByteStringUtf8 -> Bool Source # (<=) :: BuiltinByteStringUtf8 -> BuiltinByteStringUtf8 -> Bool Source # (>) :: BuiltinByteStringUtf8 -> BuiltinByteStringUtf8 -> Bool Source # (>=) :: BuiltinByteStringUtf8 -> BuiltinByteStringUtf8 -> Bool Source # max :: BuiltinByteStringUtf8 -> BuiltinByteStringUtf8 -> BuiltinByteStringUtf8 Source # min :: BuiltinByteStringUtf8 -> BuiltinByteStringUtf8 -> BuiltinByteStringUtf8 Source # | |
| Hashable BuiltinByteStringUtf8 Source # | |
Defined in PlutusTx.Builtins.HasOpaque | |
| ByteArray BuiltinByteStringUtf8 Source # | |
Defined in PlutusTx.Builtins.HasOpaque | |
| ByteArrayAccess BuiltinByteStringUtf8 Source # | |
Defined in PlutusTx.Builtins.HasOpaque Methods length :: BuiltinByteStringUtf8 -> Int withByteArray :: BuiltinByteStringUtf8 -> (Ptr p -> IO a) -> IO a copyByteArrayToPtr :: BuiltinByteStringUtf8 -> Ptr p -> IO () | |
| Pretty BuiltinByteStringUtf8 Source # | |
Defined in PlutusTx.Builtins.HasOpaque | |
| Serialise BuiltinByteStringUtf8 Source # | |
Defined in PlutusTx.Builtins.HasOpaque Methods encode :: BuiltinByteStringUtf8 -> Encoding decode :: Decoder s BuiltinByteStringUtf8 encodeList :: [BuiltinByteStringUtf8] -> Encoding decodeList :: Decoder s [BuiltinByteStringUtf8] | |
Integer builtins
Arbitrary precision integers. In contrast with fixed-size integral types
such as Int, the Integer type represents the entire infinite range of
integers.
Integers are stored in a kind of sign-magnitude form, hence do not expect two's complement form when using bit operations.
If the value is small (fit into an Int), IS constructor is used.
Otherwise IP and IN constructors are used to store a BigNat
representing respectively the positive or the negative value magnitude.
Instances
| FromJSON Integer | |||||||||||||
Defined in Data.Aeson.Types.FromJSON | |||||||||||||
| FromJSONKey Integer | |||||||||||||
Defined in Data.Aeson.Types.FromJSON | |||||||||||||
| ToJSON Integer | |||||||||||||
Defined in Data.Aeson.Types.ToJSON Methods toEncoding :: Integer -> Encoding toJSONList :: [Integer] -> Value toEncodingList :: [Integer] -> Encoding | |||||||||||||
| ToJSONKey Integer | |||||||||||||
Defined in Data.Aeson.Types.ToJSON | |||||||||||||
| Data Integer | Since: base-4.0.0.0 | ||||||||||||
Defined in Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Integer -> c Integer Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Integer Source # toConstr :: Integer -> Constr Source # dataTypeOf :: Integer -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Integer) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Integer) Source # gmapT :: (forall b. Data b => b -> b) -> Integer -> Integer Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Integer -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Integer -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Integer -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Integer -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Integer -> m Integer Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Integer -> m Integer Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Integer -> m Integer Source # | |||||||||||||
| Bits Integer | Since: base-2.1 | ||||||||||||
Defined in GHC.Bits Methods (.&.) :: Integer -> Integer -> Integer Source # (.|.) :: Integer -> Integer -> Integer Source # xor :: Integer -> Integer -> Integer Source # complement :: Integer -> Integer Source # shift :: Integer -> Int -> Integer Source # rotate :: Integer -> Int -> Integer Source # bit :: Int -> Integer Source # setBit :: Integer -> Int -> Integer Source # clearBit :: Integer -> Int -> Integer Source # complementBit :: Integer -> Int -> Integer Source # testBit :: Integer -> Int -> Bool Source # bitSizeMaybe :: Integer -> Maybe Int Source # bitSize :: Integer -> Int Source # isSigned :: Integer -> Bool Source # shiftL :: Integer -> Int -> Integer Source # unsafeShiftL :: Integer -> Int -> Integer Source # shiftR :: Integer -> Int -> Integer Source # unsafeShiftR :: Integer -> Int -> Integer Source # rotateL :: Integer -> Int -> Integer Source # | |||||||||||||
| Enum Integer | Since: base-2.1 | ||||||||||||
Defined in GHC.Enum Methods succ :: Integer -> Integer Source # pred :: Integer -> Integer Source # toEnum :: Int -> Integer Source # fromEnum :: Integer -> Int Source # enumFrom :: Integer -> [Integer] Source # enumFromThen :: Integer -> Integer -> [Integer] Source # enumFromTo :: Integer -> Integer -> [Integer] Source # enumFromThenTo :: Integer -> Integer -> Integer -> [Integer] Source # | |||||||||||||
| Ix Integer | Since: base-2.1 | ||||||||||||
| Num Integer | Since: base-2.1 | ||||||||||||
Defined in GHC.Num | |||||||||||||
| Read Integer | Since: base-2.1 | ||||||||||||
| Integral Integer | Since: base-2.0.1 | ||||||||||||
Defined in GHC.Real Methods quot :: Integer -> Integer -> Integer Source # rem :: Integer -> Integer -> Integer Source # div :: Integer -> Integer -> Integer Source # mod :: Integer -> Integer -> Integer Source # quotRem :: Integer -> Integer -> (Integer, Integer) Source # | |||||||||||||
| Real Integer | Since: base-2.0.1 | ||||||||||||
| Show Integer | Since: base-2.1 | ||||||||||||
| PrintfArg Integer | Since: base-2.1 | ||||||||||||
Defined in Text.Printf Methods formatArg :: Integer -> FieldFormatter Source # parseFormat :: Integer -> ModifierParser Source # | |||||||||||||
| Subtractive Integer | |||||||||||||
Defined in Basement.Numerical.Subtractive Associated Types
| |||||||||||||
| Default Integer | |||||||||||||
Defined in Data.Default.Internal | |||||||||||||
| NFData Integer | |||||||||||||
Defined in Control.DeepSeq | |||||||||||||
| Buildable Integer | |||||||||||||
Defined in Formatting.Buildable | |||||||||||||
| Eq Integer | |||||||||||||
| Ord Integer | |||||||||||||
| Hashable Integer | |||||||||||||
Defined in Data.Hashable.Class | |||||||||||||
| ExMemoryUsage Integer | |||||||||||||
Defined in PlutusCore.Evaluation.Machine.ExMemoryUsage Methods memoryUsage :: Integer -> CostRose | |||||||||||||
| HasBlueprintDefinition Integer Source # | |||||||||||||
Defined in PlutusTx.Blueprint.Definition.Unroll Associated Types
Methods | |||||||||||||
| HasFromBuiltin BuiltinInteger Source # | |||||||||||||
Defined in PlutusTx.Builtins.HasBuiltin Associated Types
Methods fromBuiltin :: BuiltinInteger -> FromBuiltin BuiltinInteger Source # | |||||||||||||
| HasToBuiltin Integer Source # | |||||||||||||
Defined in PlutusTx.Builtins.HasBuiltin Associated Types
| |||||||||||||
| MkNil BuiltinInteger Source # | |||||||||||||
Defined in PlutusTx.Builtins.HasOpaque Methods | |||||||||||||
| Enum Integer Source # | |||||||||||||
Defined in PlutusTx.Enum.Class | |||||||||||||
| Eq Integer Source # | |||||||||||||
| FromData Integer Source # | |||||||||||||
Defined in PlutusTx.IsData.Class Methods | |||||||||||||
| ToData Integer Source # | |||||||||||||
Defined in PlutusTx.IsData.Class Methods toBuiltinData :: Integer -> BuiltinData Source # | |||||||||||||
| UnsafeFromData Integer Source # | |||||||||||||
Defined in PlutusTx.IsData.Class Methods | |||||||||||||
| AdditiveGroup Integer Source # | |||||||||||||
| AdditiveMonoid Integer Source # | |||||||||||||
Defined in PlutusTx.Numeric | |||||||||||||
| AdditiveSemigroup Integer Source # | |||||||||||||
| MultiplicativeMonoid Integer Source # | |||||||||||||
Defined in PlutusTx.Numeric | |||||||||||||
| MultiplicativeSemigroup Integer Source # | |||||||||||||
| Ord Integer Source # | |||||||||||||
Defined in PlutusTx.Ord.Class | |||||||||||||
| Show Integer Source # | |||||||||||||
| Pretty Integer | |||||||||||||
Defined in Prettyprinter.Internal | |||||||||||||
| UniformRange Integer | |||||||||||||
| Serialise Integer | |||||||||||||
Defined in Codec.Serialise.Class | |||||||||||||
| Pretty Rational | |||||||||||||
Defined in Text.PrettyPrint.Annotated.WL | |||||||||||||
| Pretty Integer | |||||||||||||
Defined in Text.PrettyPrint.Annotated.WL | |||||||||||||
| ZigZag Integer Natural | |||||||||||||
| HasBlueprintSchema Integer referencedTypes Source # | |||||||||||||
Defined in PlutusTx.Blueprint.Class | |||||||||||||
| HasFromOpaque BuiltinInteger BuiltinInteger Source # | |||||||||||||
Defined in PlutusTx.Builtins.HasOpaque Methods | |||||||||||||
| HasToOpaque BuiltinInteger BuiltinInteger Source # | |||||||||||||
Defined in PlutusTx.Builtins.HasOpaque Methods | |||||||||||||
| HasTermLevel uni Integer => Lift uni BuiltinInteger Source # | |||||||||||||
Defined in PlutusTx.Lift.Class Methods lift :: BuiltinInteger -> RTCompile uni fun (Term TyName Name uni fun ()) Source # | |||||||||||||
| Module Integer Rational Source # | |||||||||||||
| DefaultPrettyBy config Integer | |||||||||||||
Defined in Text.PrettyBy.Internal Methods defaultPrettyBy :: config -> Integer -> Doc ann defaultPrettyListBy :: config -> [Integer] -> Doc ann | |||||||||||||
| NonDefaultPrettyBy ConstConfig Integer | |||||||||||||
Defined in PlutusCore.Pretty.PrettyConst Methods nonDefaultPrettyBy :: ConstConfig -> Integer -> Doc ann nonDefaultPrettyListBy :: ConstConfig -> [Integer] -> Doc ann | |||||||||||||
| PrettyDefaultBy config Integer => PrettyBy config Integer | |||||||||||||
Defined in Text.PrettyBy.Internal | |||||||||||||
| Lift Integer | |||||||||||||
| KnownBuiltinTypeIn DefaultUni term Integer => MakeKnownIn DefaultUni term Integer | |||||||||||||
Defined in PlutusCore.Default.Universe | |||||||||||||
| KnownBuiltinTypeIn DefaultUni term Integer => ReadKnownIn DefaultUni term Integer | |||||||||||||
Defined in PlutusCore.Default.Universe | |||||||||||||
| Contains DefaultUni Integer | |||||||||||||
Defined in PlutusCore.Default.Universe | |||||||||||||
| HasTypeLevel uni Integer => Typeable uni BuiltinInteger Source # | |||||||||||||
Defined in PlutusTx.Lift.Class | |||||||||||||
| KnownNat n => Reifies (n :: Nat) Integer | |||||||||||||
Defined in Data.Reflection | |||||||||||||
| KnownBuiltinTypeAst tyname DefaultUni Integer => KnownTypeAst tyname DefaultUni Integer | |||||||||||||
Defined in PlutusCore.Default.Universe Associated Types
Methods typeAst :: Type tyname DefaultUni () | |||||||||||||
| type Difference Integer | |||||||||||||
Defined in Basement.Numerical.Subtractive | |||||||||||||
| type Unroll Integer Source # | |||||||||||||
Defined in PlutusTx.Blueprint.Definition.Unroll | |||||||||||||
| type FromBuiltin BuiltinInteger Source # | |||||||||||||
Defined in PlutusTx.Builtins.HasBuiltin | |||||||||||||
| type ToBuiltin Integer Source # | |||||||||||||
Defined in PlutusTx.Builtins.HasBuiltin | |||||||||||||
| type IsBuiltin DefaultUni Integer | |||||||||||||
Defined in PlutusCore.Default.Universe | |||||||||||||
| type ToBinds DefaultUni acc Integer | |||||||||||||
Defined in PlutusCore.Default.Universe | |||||||||||||
| type ToHoles DefaultUni hole Integer | |||||||||||||
Defined in PlutusCore.Default.Universe | |||||||||||||
remainderInteger :: Integer -> Integer -> Integer Source #
Take the remainder of dividing two Integers.
greaterThanInteger :: Integer -> Integer -> Bool Source #
Check whether one Integer is greater than another.
greaterThanEqualsInteger :: Integer -> Integer -> Bool Source #
Check whether one Integer is greater than or equal to another.
lessThanInteger :: Integer -> Integer -> Bool Source #
Check whether one Integer is less than another.
lessThanEqualsInteger :: Integer -> Integer -> Bool Source #
Check whether one Integer is less than or equal to another.
caseInteger :: Integer -> [a] -> a Source #
Error
Data
data BuiltinData Source #
A type corresponding to the Plutus Core builtin equivalent of Data.
The point of this type is to be an opaque equivalent of Data, so as to
ensure that it is only used in ways that the compiler can handle.
As such, you should use this type in your on-chain code, and in any data structures that you want to be representable on-chain.
For off-chain usage, there are conversion functions builtinDataToData and
dataToBuiltinData, but note that these will not work on-chain.
Instances
| Data BuiltinData Source # | |||||
Defined in PlutusTx.Builtins.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BuiltinData -> c BuiltinData Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c BuiltinData Source # toConstr :: BuiltinData -> Constr Source # dataTypeOf :: BuiltinData -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c BuiltinData) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BuiltinData) Source # gmapT :: (forall b. Data b => b -> b) -> BuiltinData -> BuiltinData Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BuiltinData -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BuiltinData -> r Source # gmapQ :: (forall d. Data d => d -> u) -> BuiltinData -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> BuiltinData -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> BuiltinData -> m BuiltinData Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BuiltinData -> m BuiltinData Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BuiltinData -> m BuiltinData Source # | |||||
| Generic BuiltinData Source # | |||||
Defined in PlutusTx.Builtins.Internal Associated Types
Methods from :: BuiltinData -> Rep BuiltinData x Source # to :: Rep BuiltinData x -> BuiltinData Source # | |||||
| Show BuiltinData Source # | |||||
Defined in PlutusTx.Builtins.Internal | |||||
| NFData BuiltinData Source # | |||||
Defined in PlutusTx.Builtins.Internal Methods rnf :: BuiltinData -> () Source # | |||||
| Eq BuiltinData Source # | |||||
Defined in PlutusTx.Builtins.Internal Methods (==) :: BuiltinData -> BuiltinData -> Bool Source # (/=) :: BuiltinData -> BuiltinData -> Bool Source # | |||||
| Ord BuiltinData Source # | |||||
Defined in PlutusTx.Builtins.Internal Methods compare :: BuiltinData -> BuiltinData -> Ordering Source # (<) :: BuiltinData -> BuiltinData -> Bool Source # (<=) :: BuiltinData -> BuiltinData -> Bool Source # (>) :: BuiltinData -> BuiltinData -> Bool Source # (>=) :: BuiltinData -> BuiltinData -> Bool Source # max :: BuiltinData -> BuiltinData -> BuiltinData Source # min :: BuiltinData -> BuiltinData -> BuiltinData Source # | |||||
| HasBlueprintDefinition BuiltinData Source # | |||||
Defined in PlutusTx.Blueprint.Definition.Unroll Associated Types
Methods | |||||
| HasFromBuiltin BuiltinData Source # | |||||
Defined in PlutusTx.Builtins.HasBuiltin Associated Types
Methods fromBuiltin :: BuiltinData -> FromBuiltin BuiltinData Source # | |||||
| MkNil BuiltinData Source # | |||||
Defined in PlutusTx.Builtins.HasOpaque Methods | |||||
| Eq BuiltinData Source # | |||||
Defined in PlutusTx.Eq.Class Methods (==) :: BuiltinData -> BuiltinData -> Bool Source # | |||||
| FromData BuiltinData Source # | |||||
Defined in PlutusTx.IsData.Class Methods fromBuiltinData :: BuiltinData -> Maybe BuiltinData Source # | |||||
| ToData BuiltinData Source # | |||||
Defined in PlutusTx.IsData.Class Methods | |||||
| UnsafeFromData BuiltinData Source # | |||||
Defined in PlutusTx.IsData.Class Methods unsafeFromBuiltinData :: BuiltinData -> BuiltinData Source # | |||||
| Show BuiltinData Source # | |||||
Defined in PlutusTx.Show Methods showsPrec :: Integer -> BuiltinData -> ShowS Source # show :: BuiltinData -> BuiltinString Source # | |||||
| Pretty BuiltinData Source # | |||||
Defined in PlutusTx.Builtins.Internal | |||||
| HasBlueprintSchema BuiltinData referencedTypes Source # | |||||
Defined in PlutusTx.Blueprint.Class | |||||
| HasFromOpaque BuiltinData BuiltinData Source # | |||||
Defined in PlutusTx.Builtins.HasOpaque Methods fromOpaque :: BuiltinData -> BuiltinData Source # | |||||
| HasToOpaque BuiltinData BuiltinData Source # | |||||
Defined in PlutusTx.Builtins.HasOpaque Methods toOpaque :: BuiltinData -> BuiltinData Source # | |||||
| HasTermLevel uni Data => Lift uni BuiltinData Source # | |||||
Defined in PlutusTx.Lift.Class Methods lift :: BuiltinData -> RTCompile uni fun (Term TyName Name uni fun ()) Source # | |||||
| HasTypeLevel uni Data => Typeable uni BuiltinData Source # | |||||
Defined in PlutusTx.Lift.Class | |||||
| HasToOpaque (BuiltinData, BuiltinData) (BuiltinPair BuiltinData BuiltinData) Source # | |||||
Defined in PlutusTx.Builtins.HasOpaque Methods toOpaque :: (BuiltinData, BuiltinData) -> BuiltinPair BuiltinData BuiltinData Source # | |||||
| type Rep BuiltinData Source # | |||||
Defined in PlutusTx.Builtins.Internal type Rep BuiltinData = D1 ('MetaData "BuiltinData" "PlutusTx.Builtins.Internal" "plutus-tx-1.60.0.0-2VI8qZOpowK2Zo3DTnqORk" 'False) (C1 ('MetaCons "BuiltinData" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceLazy 'DecidedLazy) (Rec0 Data))) | |||||
| type Unroll BuiltinData Source # | |||||
Defined in PlutusTx.Blueprint.Definition.Unroll | |||||
| type FromBuiltin BuiltinData Source # | |||||
Defined in PlutusTx.Builtins.HasBuiltin | |||||
chooseData :: BuiltinData -> a -> a -> a -> a -> a -> a Source #
Given five values for the five different constructors of BuiltinData, selects
one depending on which corresponds to the actual constructor of the given value.
matchData :: BuiltinData -> (Integer -> [BuiltinData] -> r) -> ([(BuiltinData, BuiltinData)] -> r) -> ([BuiltinData] -> r) -> (Integer -> r) -> (BuiltinByteString -> r) -> r Source #
Given a BuiltinData value and matching functions for the five constructors,
applies the appropriate matcher to the arguments of the constructor and returns the result.
matchData' :: BuiltinData -> (Integer -> BuiltinList BuiltinData -> r) -> (BuiltinList (BuiltinPair BuiltinData BuiltinData) -> r) -> (BuiltinList BuiltinData -> r) -> (Integer -> r) -> (BuiltinByteString -> r) -> r Source #
equalsData :: BuiltinData -> BuiltinData -> Bool Source #
Check if two BuiltinDatas are equal.
serialiseData :: BuiltinData -> BuiltinByteString Source #
Convert a String into a ByteString.
mkConstr :: Integer -> [BuiltinData] -> BuiltinData Source #
Constructs a BuiltinData value with the Constr constructor.
mkMap :: [(BuiltinData, BuiltinData)] -> BuiltinData Source #
Constructs a BuiltinData value with the Map constructor.
mkList :: [BuiltinData] -> BuiltinData Source #
Constructs a BuiltinData value with the List constructor.
mkI :: Integer -> BuiltinData Source #
Constructs a BuiltinData value with the I constructor.
mkB :: BuiltinByteString -> BuiltinData Source #
Constructs a BuiltinData value with the B constructor.
unsafeDataAsConstr :: BuiltinData -> (Integer, [BuiltinData]) Source #
Deconstructs a BuiltinData as a Constr, or fails if it is not one.
unsafeDataAsMap :: BuiltinData -> [(BuiltinData, BuiltinData)] Source #
Deconstructs a BuiltinData as a Map, or fails if it is not one.
unsafeDataAsList :: BuiltinData -> [BuiltinData] Source #
Deconstructs a BuiltinData as a List, or fails if it is not one.
unsafeDataAsI :: BuiltinData -> Integer Source #
Deconstructs a BuiltinData as an I, or fails if it is not one.
unsafeDataAsB :: BuiltinData -> BuiltinByteString Source #
Deconstructs a BuiltinData as a B, or fails if it is not one.
builtinDataToData :: BuiltinData -> Data Source #
NOT a builtin. Converts a BuiltinData into a Data. Only works off-chain.
dataToBuiltinData :: Data -> BuiltinData Source #
NOT a builtin. Converts a Data into a BuiltinData. Only works off-chain.
Strings
data BuiltinString Source #
Instances
| Data BuiltinString Source # | |||||
Defined in PlutusTx.Builtins.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BuiltinString -> c BuiltinString Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c BuiltinString Source # toConstr :: BuiltinString -> Constr Source # dataTypeOf :: BuiltinString -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c BuiltinString) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BuiltinString) Source # gmapT :: (forall b. Data b => b -> b) -> BuiltinString -> BuiltinString Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BuiltinString -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BuiltinString -> r Source # gmapQ :: (forall d. Data d => d -> u) -> BuiltinString -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> BuiltinString -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> BuiltinString -> m BuiltinString Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BuiltinString -> m BuiltinString Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BuiltinString -> m BuiltinString Source # | |||||
| IsString BuiltinString Source # | |||||
Defined in PlutusTx.Builtins.HasOpaque Methods fromString :: String -> BuiltinString Source # | |||||
| Show BuiltinString Source # | |||||
Defined in PlutusTx.Builtins.Internal | |||||
| Eq BuiltinString Source # | |||||
Defined in PlutusTx.Builtins.Internal Methods (==) :: BuiltinString -> BuiltinString -> Bool Source # (/=) :: BuiltinString -> BuiltinString -> Bool Source # | |||||
| Ord BuiltinString Source # | |||||
Defined in PlutusTx.Builtins.Internal Methods compare :: BuiltinString -> BuiltinString -> Ordering Source # (<) :: BuiltinString -> BuiltinString -> Bool Source # (<=) :: BuiltinString -> BuiltinString -> Bool Source # (>) :: BuiltinString -> BuiltinString -> Bool Source # (>=) :: BuiltinString -> BuiltinString -> Bool Source # max :: BuiltinString -> BuiltinString -> BuiltinString Source # min :: BuiltinString -> BuiltinString -> BuiltinString Source # | |||||
| HasBlueprintDefinition BuiltinString Source # | |||||
Defined in PlutusTx.Blueprint.Definition.Unroll Associated Types
Methods | |||||
| HasFromBuiltin BuiltinString Source # | |||||
Defined in PlutusTx.Builtins.HasBuiltin Associated Types
Methods fromBuiltin :: BuiltinString -> FromBuiltin BuiltinString Source # | |||||
| Eq BuiltinString Source # | |||||
Defined in PlutusTx.Eq.Class Methods (==) :: BuiltinString -> BuiltinString -> Bool Source # | |||||
| Monoid BuiltinString Source # | |||||
Defined in PlutusTx.Monoid Methods | |||||
| Semigroup BuiltinString Source # | |||||
Defined in PlutusTx.Semigroup Methods (<>) :: BuiltinString -> BuiltinString -> BuiltinString Source # | |||||
| Show BuiltinString Source # | |||||
Defined in PlutusTx.Show Methods showsPrec :: Integer -> BuiltinString -> ShowS Source # show :: BuiltinString -> BuiltinString Source # | |||||
| HasBlueprintSchema BuiltinString referencedTypes Source # | |||||
Defined in PlutusTx.Blueprint.Class | |||||
| HasFromOpaque BuiltinString BuiltinString Source # | |||||
Defined in PlutusTx.Builtins.HasOpaque Methods | |||||
| HasToOpaque BuiltinString BuiltinString Source # | |||||
Defined in PlutusTx.Builtins.HasOpaque Methods | |||||
| HasTermLevel uni Text => Lift uni BuiltinString Source # | |||||
Defined in PlutusTx.Lift.Class Methods lift :: BuiltinString -> RTCompile uni fun (Term TyName Name uni fun ()) Source # | |||||
| HasTypeLevel uni Text => Typeable uni BuiltinString Source # | |||||
Defined in PlutusTx.Lift.Class | |||||
| type Unroll BuiltinString Source # | |||||
Defined in PlutusTx.Blueprint.Definition.Unroll | |||||
| type FromBuiltin BuiltinString Source # | |||||
Defined in PlutusTx.Builtins.HasBuiltin | |||||
appendString :: BuiltinString -> BuiltinString -> BuiltinString Source #
Append two Strings.
emptyString :: BuiltinString Source #
An empty String.
equalsString :: BuiltinString -> BuiltinString -> Bool Source #
Check if two strings are equal
encodeUtf8 :: BuiltinString -> BuiltinByteString Source #
Convert a String into a ByteString.
Pairs
pairToPair :: BuiltinPair a b -> (a, b) Source #
Turn a builtin pair into a normal pair, useful in patterns.
casePair :: BuiltinPair a b -> (a -> b -> r) -> r Source #
Case matching on a builtin pair. Continuation is needed here to make it more efficient on builtin-casing implementation.
Lists
mkNil :: MkNil arep => BuiltinList arep Source #
mkNilOpaque :: BuiltinList a Source #
The empty list of elements of the given type that gets spotted by the plugin (grep for
mkNilOpaque in the plugin code) and replaced by the actual empty list constant for types that
are supported (a subset of built-in types).
null :: BuiltinList a -> Bool Source #
caseList' :: forall a r. r -> (a -> BuiltinList a -> r) -> BuiltinList a -> r Source #
Similar to chooseList but deconstructs the list in case provided list is not empty.
caseList :: forall a r. (() -> r) -> (a -> BuiltinList a -> r) -> BuiltinList a -> r Source #
matchList :: BuiltinList a -> (() -> r) -> (a -> BuiltinList a -> r) -> r Source #
matchList' :: BuiltinList a -> r -> (a -> BuiltinList a -> r) -> r Source #
headMaybe :: BuiltinList a -> Maybe a Source #
head :: BuiltinList a -> a Source #
Takes the first element of the list and fails if given list is empty.
tail :: BuiltinList a -> BuiltinList a Source #
Takes the last element of the list and fails if given list is empty.
drop :: Integer -> BuiltinList a -> BuiltinList a Source #
Drops first n elements from the given list and never fails.
uncons :: BuiltinList a -> Maybe (a, BuiltinList a) Source #
Uncons a builtin list, failing if the list is empty, useful in patterns.
unsafeUncons :: BuiltinList a -> (a, BuiltinList a) Source #
Uncons a builtin list, failing if the list is empty, useful in patterns.
Arrays
data BuiltinArray a Source #
Instances
| (HasFromBuiltin arep, HasTermLevel uni (Vector (FromBuiltin arep))) => Lift uni (BuiltinArray arep) Source # | |||||
Defined in PlutusTx.Lift.Class Methods lift :: BuiltinArray arep -> RTCompile uni fun (Term TyName Name uni fun ()) Source # | |||||
| Data a => Data (BuiltinArray a) Source # | |||||
Defined in PlutusTx.Builtins.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BuiltinArray a -> c (BuiltinArray a) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (BuiltinArray a) Source # toConstr :: BuiltinArray a -> Constr Source # dataTypeOf :: BuiltinArray a -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (BuiltinArray a)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (BuiltinArray a)) Source # gmapT :: (forall b. Data b => b -> b) -> BuiltinArray a -> BuiltinArray a Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BuiltinArray a -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BuiltinArray a -> r Source # gmapQ :: (forall d. Data d => d -> u) -> BuiltinArray a -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> BuiltinArray a -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> BuiltinArray a -> m (BuiltinArray a) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BuiltinArray a -> m (BuiltinArray a) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BuiltinArray a -> m (BuiltinArray a) Source # | |||||
| Show a => Show (BuiltinArray a) Source # | |||||
Defined in PlutusTx.Builtins.Internal | |||||
| Eq a => Eq (BuiltinArray a) Source # | |||||
Defined in PlutusTx.Builtins.Internal Methods (==) :: BuiltinArray a -> BuiltinArray a -> Bool Source # (/=) :: BuiltinArray a -> BuiltinArray a -> Bool Source # | |||||
| Ord a => Ord (BuiltinArray a) Source # | |||||
Defined in PlutusTx.Builtins.Internal Methods compare :: BuiltinArray a -> BuiltinArray a -> Ordering Source # (<) :: BuiltinArray a -> BuiltinArray a -> Bool Source # (<=) :: BuiltinArray a -> BuiltinArray a -> Bool Source # (>) :: BuiltinArray a -> BuiltinArray a -> Bool Source # (>=) :: BuiltinArray a -> BuiltinArray a -> Bool Source # max :: BuiltinArray a -> BuiltinArray a -> BuiltinArray a Source # min :: BuiltinArray a -> BuiltinArray a -> BuiltinArray a Source # | |||||
| HasFromBuiltin a => HasFromBuiltin (BuiltinArray a) Source # | |||||
Defined in PlutusTx.Builtins.HasBuiltin Associated Types
Methods fromBuiltin :: BuiltinArray a -> FromBuiltin (BuiltinArray a) Source # | |||||
| MkNil a => MkNil (BuiltinArray a) Source # | |||||
Defined in PlutusTx.Builtins.HasOpaque Methods mkNil :: BuiltinList (BuiltinArray a) Source # | |||||
| HasTypeLevel uni Vector => Typeable uni BuiltinArray Source # | |||||
Defined in PlutusTx.Lift.Class | |||||
| type FromBuiltin (BuiltinArray a) Source # | |||||
Defined in PlutusTx.Builtins.HasBuiltin | |||||
listToArray :: BuiltinList a -> BuiltinArray a Source #
Converts given list into array and never fails.
sopListToArray :: (HasToOpaque a arep, MkNil arep) => [a] -> BuiltinArray arep Source #
lengthOfArray :: BuiltinArray a -> BuiltinInteger Source #
Returns the length of the provided array and never fails
indexArray :: BuiltinArray a -> BuiltinInteger -> a Source #
Returns the n-th element from the array. Fails if the given index is not in the range [0..j),
where j is the length of the array.
Tracing
trace :: BuiltinString -> a -> a Source #
Emit the given string as a trace message before evaluating the argument.
BLS12_381
data BuiltinBLS12_381_G1_Element Source #
Instances
| Show BuiltinBLS12_381_G1_Element Source # | |||||
Defined in PlutusTx.Builtins.Internal | |||||
| NFData BuiltinBLS12_381_G1_Element Source # | |||||
Defined in PlutusTx.Builtins.Internal Methods rnf :: BuiltinBLS12_381_G1_Element -> () Source # | |||||
| Eq BuiltinBLS12_381_G1_Element Source # | |||||
Defined in PlutusTx.Builtins.Internal Methods (==) :: BuiltinBLS12_381_G1_Element -> BuiltinBLS12_381_G1_Element -> Bool Source # (/=) :: BuiltinBLS12_381_G1_Element -> BuiltinBLS12_381_G1_Element -> Bool Source # | |||||
| HasFromBuiltin BuiltinBLS12_381_G1_Element Source # | |||||
Defined in PlutusTx.Builtins.HasBuiltin Associated Types
| |||||
| MkNil BuiltinBLS12_381_G1_Element Source # | |||||
Defined in PlutusTx.Builtins.HasOpaque Methods | |||||
| Eq BuiltinBLS12_381_G1_Element Source # | |||||
Defined in PlutusTx.Eq.Class Methods (==) :: BuiltinBLS12_381_G1_Element -> BuiltinBLS12_381_G1_Element -> Bool Source # | |||||
| FromData BuiltinBLS12_381_G1_Element Source # | |||||
Defined in PlutusTx.IsData.Class Methods fromBuiltinData :: BuiltinData -> Maybe BuiltinBLS12_381_G1_Element Source # | |||||
| ToData BuiltinBLS12_381_G1_Element Source # | For the BLS12-381 G1 and G2 types we use the | ||||
Defined in PlutusTx.IsData.Class Methods toBuiltinData :: BuiltinBLS12_381_G1_Element -> BuiltinData Source # | |||||
| UnsafeFromData BuiltinBLS12_381_G1_Element Source # | |||||
Defined in PlutusTx.IsData.Class Methods unsafeFromBuiltinData :: BuiltinData -> BuiltinBLS12_381_G1_Element Source # | |||||
| Pretty BuiltinBLS12_381_G1_Element Source # | |||||
Defined in PlutusTx.Builtins.Internal Methods pretty :: BuiltinBLS12_381_G1_Element -> Doc ann prettyList :: [BuiltinBLS12_381_G1_Element] -> Doc ann | |||||
| HasFromOpaque BuiltinBLS12_381_G1_Element BuiltinBLS12_381_G1_Element Source # | |||||
Defined in PlutusTx.Builtins.HasOpaque | |||||
| HasToOpaque BuiltinBLS12_381_G1_Element BuiltinBLS12_381_G1_Element Source # | |||||
Defined in PlutusTx.Builtins.HasOpaque | |||||
| HasTermLevel uni Element => Lift uni BuiltinBLS12_381_G1_Element Source # | |||||
Defined in PlutusTx.Lift.Class Methods lift :: BuiltinBLS12_381_G1_Element -> RTCompile uni fun (Term TyName Name uni fun ()) Source # | |||||
| HasTypeLevel uni Element => Typeable uni BuiltinBLS12_381_G1_Element Source # | |||||
Defined in PlutusTx.Lift.Class | |||||
| type FromBuiltin BuiltinBLS12_381_G1_Element Source # | |||||
Defined in PlutusTx.Builtins.HasBuiltin | |||||
bls12_381_G1_add :: BuiltinBLS12_381_G1_Element -> BuiltinBLS12_381_G1_Element -> BuiltinBLS12_381_G1_Element Source #
bls12_381_G1_scalarMul :: Integer -> BuiltinBLS12_381_G1_Element -> BuiltinBLS12_381_G1_Element Source #
bls12_381_G1_multiScalarMul :: [Integer] -> [BuiltinBLS12_381_G1_Element] -> BuiltinBLS12_381_G1_Element Source #
bls12_381_G1_hashToGroup :: BuiltinByteString -> BuiltinByteString -> BuiltinBLS12_381_G1_Element Source #
data BuiltinBLS12_381_G2_Element Source #
Instances
| Show BuiltinBLS12_381_G2_Element Source # | |||||
Defined in PlutusTx.Builtins.Internal | |||||
| NFData BuiltinBLS12_381_G2_Element Source # | |||||
Defined in PlutusTx.Builtins.Internal Methods rnf :: BuiltinBLS12_381_G2_Element -> () Source # | |||||
| Eq BuiltinBLS12_381_G2_Element Source # | |||||
Defined in PlutusTx.Builtins.Internal Methods (==) :: BuiltinBLS12_381_G2_Element -> BuiltinBLS12_381_G2_Element -> Bool Source # (/=) :: BuiltinBLS12_381_G2_Element -> BuiltinBLS12_381_G2_Element -> Bool Source # | |||||
| HasFromBuiltin BuiltinBLS12_381_G2_Element Source # | |||||
Defined in PlutusTx.Builtins.HasBuiltin Associated Types
| |||||
| MkNil BuiltinBLS12_381_G2_Element Source # | |||||
Defined in PlutusTx.Builtins.HasOpaque Methods | |||||
| Eq BuiltinBLS12_381_G2_Element Source # | |||||
Defined in PlutusTx.Eq.Class Methods (==) :: BuiltinBLS12_381_G2_Element -> BuiltinBLS12_381_G2_Element -> Bool Source # | |||||
| FromData BuiltinBLS12_381_G2_Element Source # | |||||
Defined in PlutusTx.IsData.Class Methods fromBuiltinData :: BuiltinData -> Maybe BuiltinBLS12_381_G2_Element Source # | |||||
| ToData BuiltinBLS12_381_G2_Element Source # | |||||
Defined in PlutusTx.IsData.Class Methods toBuiltinData :: BuiltinBLS12_381_G2_Element -> BuiltinData Source # | |||||
| UnsafeFromData BuiltinBLS12_381_G2_Element Source # | |||||
Defined in PlutusTx.IsData.Class Methods unsafeFromBuiltinData :: BuiltinData -> BuiltinBLS12_381_G2_Element Source # | |||||
| Pretty BuiltinBLS12_381_G2_Element Source # | |||||
Defined in PlutusTx.Builtins.Internal Methods pretty :: BuiltinBLS12_381_G2_Element -> Doc ann prettyList :: [BuiltinBLS12_381_G2_Element] -> Doc ann | |||||
| HasFromOpaque BuiltinBLS12_381_G2_Element BuiltinBLS12_381_G2_Element Source # | |||||
Defined in PlutusTx.Builtins.HasOpaque | |||||
| HasToOpaque BuiltinBLS12_381_G2_Element BuiltinBLS12_381_G2_Element Source # | |||||
Defined in PlutusTx.Builtins.HasOpaque | |||||
| HasTermLevel uni Element => Lift uni BuiltinBLS12_381_G2_Element Source # | |||||
Defined in PlutusTx.Lift.Class Methods lift :: BuiltinBLS12_381_G2_Element -> RTCompile uni fun (Term TyName Name uni fun ()) Source # | |||||
| HasTypeLevel uni Element => Typeable uni BuiltinBLS12_381_G2_Element Source # | |||||
Defined in PlutusTx.Lift.Class | |||||
| type FromBuiltin BuiltinBLS12_381_G2_Element Source # | |||||
Defined in PlutusTx.Builtins.HasBuiltin | |||||
bls12_381_G2_add :: BuiltinBLS12_381_G2_Element -> BuiltinBLS12_381_G2_Element -> BuiltinBLS12_381_G2_Element Source #
bls12_381_G2_scalarMul :: Integer -> BuiltinBLS12_381_G2_Element -> BuiltinBLS12_381_G2_Element Source #
bls12_381_G2_multiScalarMul :: [Integer] -> [BuiltinBLS12_381_G2_Element] -> BuiltinBLS12_381_G2_Element Source #
bls12_381_G2_hashToGroup :: BuiltinByteString -> BuiltinByteString -> BuiltinBLS12_381_G2_Element Source #
data BuiltinBLS12_381_MlResult Source #
Instances
| Show BuiltinBLS12_381_MlResult Source # | |||||
Defined in PlutusTx.Builtins.Internal | |||||
| NFData BuiltinBLS12_381_MlResult Source # | |||||
Defined in PlutusTx.Builtins.Internal Methods rnf :: BuiltinBLS12_381_MlResult -> () Source # | |||||
| Eq BuiltinBLS12_381_MlResult Source # | |||||
Defined in PlutusTx.Builtins.Internal Methods (==) :: BuiltinBLS12_381_MlResult -> BuiltinBLS12_381_MlResult -> Bool Source # (/=) :: BuiltinBLS12_381_MlResult -> BuiltinBLS12_381_MlResult -> Bool Source # | |||||
| HasFromBuiltin BuiltinBLS12_381_MlResult Source # | |||||
Defined in PlutusTx.Builtins.HasBuiltin Associated Types
| |||||
| (TypeError ('Text "fromBuiltinData is not supported for BuiltinBLS12_381_MlResult") :: Constraint) => FromData BuiltinBLS12_381_MlResult Source # | |||||
Defined in PlutusTx.IsData.Class Methods fromBuiltinData :: BuiltinData -> Maybe BuiltinBLS12_381_MlResult Source # | |||||
| (TypeError ('Text "toBuiltinData is not supported for BuiltinBLS12_381_MlResult") :: Constraint) => ToData BuiltinBLS12_381_MlResult Source # | We do not provide instances of any of these classes for BuiltinBLS12_381_MlResult since there is no serialisation format: we expect that values of that type will only occur as the result of on-chain computations. | ||||
Defined in PlutusTx.IsData.Class Methods toBuiltinData :: BuiltinBLS12_381_MlResult -> BuiltinData Source # | |||||
| (TypeError ('Text "unsafeFromBuiltinData is not supported for BuiltinBLS12_381_MlResult") :: Constraint) => UnsafeFromData BuiltinBLS12_381_MlResult Source # | |||||
Defined in PlutusTx.IsData.Class Methods unsafeFromBuiltinData :: BuiltinData -> BuiltinBLS12_381_MlResult Source # | |||||
| Pretty BuiltinBLS12_381_MlResult Source # | |||||
Defined in PlutusTx.Builtins.Internal Methods pretty :: BuiltinBLS12_381_MlResult -> Doc ann prettyList :: [BuiltinBLS12_381_MlResult] -> Doc ann | |||||
| HasFromOpaque BuiltinBLS12_381_MlResult BuiltinBLS12_381_MlResult Source # | |||||
Defined in PlutusTx.Builtins.HasOpaque Methods fromOpaque :: BuiltinBLS12_381_MlResult -> BuiltinBLS12_381_MlResult Source # | |||||
| HasToOpaque BuiltinBLS12_381_MlResult BuiltinBLS12_381_MlResult Source # | |||||
Defined in PlutusTx.Builtins.HasOpaque Methods toOpaque :: BuiltinBLS12_381_MlResult -> BuiltinBLS12_381_MlResult Source # | |||||
| HasTermLevel uni MlResult => Lift uni BuiltinBLS12_381_MlResult Source # | |||||
Defined in PlutusTx.Lift.Class Methods lift :: BuiltinBLS12_381_MlResult -> RTCompile uni fun (Term TyName Name uni fun ()) Source # | |||||
| HasTypeLevel uni MlResult => Typeable uni BuiltinBLS12_381_MlResult Source # | |||||
Defined in PlutusTx.Lift.Class | |||||
| type FromBuiltin BuiltinBLS12_381_MlResult Source # | |||||
Defined in PlutusTx.Builtins.HasBuiltin | |||||
bls12_381_millerLoop :: BuiltinBLS12_381_G1_Element -> BuiltinBLS12_381_G2_Element -> BuiltinBLS12_381_MlResult Source #
bls12_381_mulMlResult :: BuiltinBLS12_381_MlResult -> BuiltinBLS12_381_MlResult -> BuiltinBLS12_381_MlResult Source #
Conversions
fromOpaque :: HasFromOpaque arep a => arep -> a Source #
toOpaque :: HasToOpaque a arep => a -> arep Source #
useToOpaque :: a -> a Source #
useFromOpaque :: a -> a Source #
fromBuiltin :: HasFromBuiltin arep => arep -> FromBuiltin arep Source #
toBuiltin :: HasToBuiltin a => a -> ToBuiltin a Source #
Logical
Byte ordering.
Constructors
| BigEndian | most-significant-byte occurs in lowest address. |
| LittleEndian | least-significant-byte occurs in lowest address. |
Instances
| Bounded ByteOrder | Since: base-4.11.0.0 |
| Enum ByteOrder | Since: base-4.11.0.0 |
Defined in GHC.ByteOrder Methods succ :: ByteOrder -> ByteOrder Source # pred :: ByteOrder -> ByteOrder Source # toEnum :: Int -> ByteOrder Source # fromEnum :: ByteOrder -> Int Source # enumFrom :: ByteOrder -> [ByteOrder] Source # enumFromThen :: ByteOrder -> ByteOrder -> [ByteOrder] Source # enumFromTo :: ByteOrder -> ByteOrder -> [ByteOrder] Source # enumFromThenTo :: ByteOrder -> ByteOrder -> ByteOrder -> [ByteOrder] Source # | |
| Generic ByteOrder | |
Defined in GHC.ByteOrder | |
| Read ByteOrder | Since: base-4.11.0.0 |
| Show ByteOrder | Since: base-4.11.0.0 |
| Eq ByteOrder | Since: base-4.11.0.0 |
| Ord ByteOrder | Since: base-4.11.0.0 |
Defined in GHC.ByteOrder | |
| type Rep ByteOrder | Since: base-4.15.0.0 |
integerToByteString :: ByteOrder -> Integer -> Integer -> BuiltinByteString Source #
Convert a BuiltinInteger into a BuiltinByteString, as described in
CIP-121.
The first argument indicates the endianness of the conversion and the third
argument is the integer to be converted, which must be non-negative. The
second argument must also be non-negative and it indicates the required width
of the output. If the width is zero then the output is the smallest
bytestring which can contain the converted input (and in this case, the
integer 0 encodes to the empty bytestring). If the width is nonzero then the
output bytestring will be padded to the required width with 0x00 bytes (on
the left for big-endian conversions and on the right for little-endian
conversions); if the input integer is too big to fit into a bytestring of the
specified width then the conversion will fail. Conversion will also fail if
the specified width is greater than 8192 or the input integer is too big to
fit into a bytestring of length 8192.
byteStringToInteger :: ByteOrder -> BuiltinByteString -> Integer Source #
Convert a BuiltinByteString to a BuiltinInteger, as described in
CIP-121.
The first argument indicates the endianness of the conversion and the second
is the bytestring to be converted. There is no limitation on the size of
the bytestring. The empty bytestring is converted to the integer 0.
andByteString :: Bool -> BuiltinByteString -> BuiltinByteString -> BuiltinByteString Source #
Perform logical AND on two BuiltinByteString arguments, as described in
CIP-122.
The first argument indicates whether padding semantics should be used or not;
if False, truncation semantics will be used instead.
See also
orByteString :: Bool -> BuiltinByteString -> BuiltinByteString -> BuiltinByteString Source #
Perform logical OR on two BuiltinByteString arguments, as described
here.
The first argument indicates whether padding semantics should be used or not;
if False, truncation semantics will be used instead.
See also
xorByteString :: Bool -> BuiltinByteString -> BuiltinByteString -> BuiltinByteString Source #
Perform logical XOR on two BuiltinByteString arguments, as described
here.
The first argument indicates whether padding semantics should be used or not;
if False, truncation semantics will be used instead.
See also
readBit :: BuiltinByteString -> Integer -> Bool Source #
Read a bit at the _bit_ index given by the Integer argument in the
BuiltinByteString argument. The result will be True if the corresponding bit is set, and
False if it is clear. Will error if given an out-of-bounds index argument; that is, if the
index is either negative, or equal to or greater than the total number of bits in the
BuiltinByteString argument.
See also
writeBits :: BuiltinByteString -> [Integer] -> Bool -> BuiltinByteString Source #
Given a BuiltinByteString, a list of indexes to change, and a boolean
value b to change those indexes to, set the bit at each of the specified
index as follows:
- If
bisTrue, set that bit; - Otherwise, clear that bit.
Will error if any of the indexes are out-of-bounds: that is, if the index is either negative, or
equal to or greater than the total number of bits in the BuiltinByteString argument.
Note
This differs slightly from the description of the corresponding operation in CIP-122; instead of a single changelist argument comprised of pairs, we instead pass a single list of indexes to change, and a single boolean value to change those indexes to. The original proposal allowed one to set and clear bits in a single operation, but constructing the list of boolean values for the updates was somewhat expensive. If it's really necessary to set some bits and clear others then it is easier to call the function twice, once to set bits and and once to clear them.
See also
replicateByte :: Integer -> Integer -> BuiltinByteString Source #
Given a length (first argument) and a byte (second argument), produce a BuiltinByteString of
that length, with that byte in every position. Will error if given a negative length, or a second
argument that isn't a byte (less than 0, greater than 255).
See also
Bitwise
shiftByteString :: BuiltinByteString -> Integer -> BuiltinByteString Source #
Shift a BuiltinByteString, as per
CIP-123.
rotateByteString :: BuiltinByteString -> Integer -> BuiltinByteString Source #
Rotate a BuiltinByteString, as per
CIP-123.
countSetBits :: BuiltinByteString -> Integer Source #
Count the set bits in a BuiltinByteString, as per
CIP-123.
findFirstSetBit :: BuiltinByteString -> Integer Source #
Find the lowest index of a set bit in a BuiltinByteString, as per
CIP-123.
If given a BuiltinByteString which consists only of zero bytes (including the empty
BuiltinByteString, this returns -1.
Value
insertCoin :: BuiltinByteString -> BuiltinByteString -> BuiltinInteger -> BuiltinValue -> BuiltinValue Source #
lookupCoin :: BuiltinByteString -> BuiltinByteString -> BuiltinValue -> Integer Source #
unionValue :: BuiltinValue -> BuiltinValue -> BuiltinValue Source #
valueContains :: BuiltinValue -> BuiltinValue -> Bool Source #
mkValue :: BuiltinValue -> BuiltinData Source #
scaleValue :: Integer -> BuiltinValue -> BuiltinValue Source #