Attributes
Members list
Value members
Inherited methods
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Bitwise logical AND for ByteStrings.
Bitwise logical AND for ByteStrings.
Value parameters
- lhs
-
The left-hand side
ByteString
. - rhs
-
The right-hand side
ByteString
. - shouldPad
-
Indicates whether to truncate the result to the length of the shorter input, or to pad with the remaining values from the longer one.
Attributes
- Returns
-
The result of the bitwise AND operation.
- See also
-
CIP-122. Performs a logical bitwise AND operation on each byte between two ByteStrings sequentially and returns the result(Formally result[i] = lhs[i] & rhs[i]). The argument shouldPad determines what to do in the case when ByteStrings are of different lengths. If shouldPad is false, the result will be the length of the shorter input. Otherwise, the result will be padded with the remaining values from the longer input.
- Example
-
andByteString(false, hex"0FFF", hex"FF") == hex"0F"
andByteString(true, hex"0FFF", hex"FF") == hex"0FFF"
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
The compressed form of the point at infinity in G1, 48 bytes long.
The compressed form of the point at infinity in G1, 48 bytes long.
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
The compressed form of the point at infinity in G2, 96 bytes long.
The compressed form of the point at infinity in G2, 96 bytes long.
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Conversion from ByteString to BigInt, as per CIP-121.
Conversion from ByteString to BigInt, as per CIP-121.
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Bitwise logical ComplementByteString for ByteStrings.
Bitwise logical ComplementByteString for ByteStrings.
Value parameters
- byteString
-
The
ByteString
that to be bitwise logical completed(inverted).
Attributes
- Returns
-
The result of the bitwise logical ComplementByteString operation.
- See also
-
[CIP-122] (https://github.com/cardano-foundation/CIPs/tree/master/CIP-0122). Performs a bitwise logical ComplementByteString operation on the input ByteString by inverting each bit (Formally resultBit[i] = if inputBit[i] == 0 then 1 else 0).
- Example
-
complementByteString(hex"FF") == hex"00"
complementByteString(hex"F0") == hex"0F"
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Bitwise logical countSetBits for ByteStrings.
Bitwise logical countSetBits for ByteStrings.
Value parameters
- byteString
-
The ByteString to be counted.
Attributes
- Returns
-
The number of set bits in the ByteString.
- See also
-
[CIP-123] (https://github.com/cardano-foundation/CIPs/tree/master/CIP-0123). Counts the number of set bits in the input ByteString.
- Example
-
countSetBits(hex"000F") == 4
countSetBits(hex"0000") == 0
countSetBits(hex"0001") == 1
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Bitwise logical findFirstSetBit for ByteStrings.
Bitwise logical findFirstSetBit for ByteStrings.
Value parameters
- byteString
-
The ByteString to be searched.
Attributes
- Returns
-
The index of the first set bit in the ByteString from the end.
- See also
-
[CIP-123] (https://github.com/cardano-foundation/CIPs/tree/master/CIP-0123). Finds the index of the first set bit in the input ByteString. The index is zero-based and starts from the end of the ByteString. If no set bits are found, -1 is returned.
- Example
-
findFirstSetBit(hex"") == -1
findFirstSetBit(hex"0000") == -1
findFirstSetBit(hex"0002") == 1
findFirstSetBit(hex"FFF2") == 1
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Conversion from BigInt to ByteString, as per CIP-121.
Conversion from BigInt to ByteString, as per CIP-121.
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Bitwise logical OR for ByteStrings.
Bitwise logical OR for ByteStrings.
Value parameters
- lhs
-
The left-hand side
ByteString
. - rhs
-
The right-hand side
ByteString
. - shouldPad
-
Indicates whether to truncate the result to the length of the shorter input, or to pad with the remaining values from the longer one.
Attributes
- Returns
-
The result of the bitwise OR operation.
- See also
-
CIP-122. Performs a logical bitwise OR operation on each byte between two ByteStrings sequentially and returns the result(Formally result[i] = lhs[i] | rhs[i]). The argument shouldPad determines what to do in the case when ByteStrings are of different lengths. If shouldPad is false, the result will be the length of the shorter input. Otherwise, the result will be padded with the remaining values from the longer input.
- Example
-
orByteString(false, hex"0FFF", hex"FF") == hex"FF"
orByteString(true, hex"0FFF", hex"FF") == hex"FFFF"
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Bitwise logical ReadBit for ByteStrings.
Bitwise logical ReadBit for ByteStrings.
Value parameters
- byteString
-
The
ByteString
that contains the bit to be read. - index
-
The index of the bit to be read.
Attributes
- Returns
-
The value of the bit at the specified index.
- Throws
-
BuiltinException
if the index is out of bounds.
- See also
-
[CIP-122] (https://github.com/cardano-foundation/CIPs/tree/master/CIP-0122). Gets the value of the bit at the specified index in the input ByteString. The index must be in the range [0 .. byteString.size * 8), otherwise BuiltinException will be thrown. Bit indexing starts from the end of the ByteString.
- Example
-
readBit(hex"0004", 2) == true
readBit(hex"0004", 15) == false
readBit(hex"0004", 16) throws BuiltinException
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Bitwise logical ReplicateByte for ByteStrings.
Bitwise logical ReplicateByte for ByteStrings.
Value parameters
- byte
-
The value of the byte to be replicated.
- length
-
The number of times to replicate the byte.
Attributes
- Returns
-
The result of the bitwise logical ReplicateByte operation.
- Throws
-
BuiltinException
if the length is negative or the byte value is out of bounds.
- See also
-
[CIP-122] (https://github.com/cardano-foundation/CIPs/tree/master/CIP-0122). Replicates a byte
length
times and returns result as ByteString. Length must be non-negative, otherwise BuiltinException will be thrown. The byte value must be in the range [0 .. 255], otherwise BuiltinException will be thrown. - Example
-
replicateByte(0, 0xFF) == hex""
replicateByte(4, 0xFF) == hex"FFFFFFFF"
replicateByte(-1, 255) throws BuiltinException
replicateByte(1, -1) throws BuiltinException
replicateByte(1, 256) throws BuiltinException
- Inherited from:
- AbstractBuiltins (hidden)
Hashing primitive Ripemd_160 for ByteStrings.
Hashing primitive Ripemd_160 for ByteStrings.
Value parameters
- byteString
-
The ByteString to be hashed.
Attributes
- Returns
-
The result of the Ripemd_160 hash function.
- See also
-
[CIP-127] (https://github.com/cardano-foundation/CIPs/tree/master/CIP-0127). Ripemd_160 hash function (https://en.wikipedia.org/wiki/RIPEMD).
- Inherited from:
- AbstractBuiltins (hidden)
Bitwise logical rotateByteString for ByteStrings.
Bitwise logical rotateByteString for ByteStrings.
Value parameters
- byteString
-
The ByteString to be rotated.
- rotation
-
The number of bits to rotates the ByteString.
Attributes
- Returns
-
The result of the bitwise logical rotateByteString operation.
- See also
-
[CIP-123] (https://github.com/cardano-foundation/CIPs/tree/master/CIP-0123). Rotates the input ByteString by the specified number of bits. A positive rotation value rotates the ByteString to the left, while a negative rotation value rotates the ByteString to the right. Rotation by more than the total number of bits is the same as the remainder after division by number of bits.
- Example
-
rotateByteString(hex"000F", 4) == hex"00F0"
rotateByteString(hex"000F", -4) == hex"F000"
rotateByteString(hex"000F", 16) == hex"000F"
rotateByteString(hex"000F", -16) == hex"000F"
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Bitwise logical shiftByteString for ByteStrings.
Bitwise logical shiftByteString for ByteStrings.
Value parameters
- byteString
-
The ByteString to be shifted.
- shift
-
The number of bits to shift the ByteString.
Attributes
- Returns
-
The result of the bitwise logical shiftByteString operation.
- See also
-
[CIP-123] (https://github.com/cardano-foundation/CIPs/tree/master/CIP-0123). Shifts the input ByteString by the specified number of bits. A positive shift value shifts the ByteString to the left, while a negative shift value shifts the ByteString to the right.
- Example
-
shiftByteString(hex"000F", 4) == hex"00F0"
shiftByteString(hex"000F", 16) == hex"0000"
shiftByteString(hex"000F", -4) == hex"0000"
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Inherited from:
- AbstractBuiltins (hidden)
Bitwise logical WriteBits for ByteStrings.
Bitwise logical WriteBits for ByteStrings.
Value parameters
- bit
-
The value of the bit to be written.
- byteString
-
The
ByteString
copy of that to be written. - indexes
-
The indexes of the bits to be written.
Attributes
- Returns
-
The result of the bitwise logical WriteBits operation.
- Throws
-
BuiltinException
if the indexes are out of bounds.
- See also
-
[CIP-122] (https://github.com/cardano-foundation/CIPs/tree/master/CIP-0122). Sets the value of the bit at the specified indexes in a copy of the input ByteString. The indexes must be in the range [0 .. byteString.size * 8), otherwise BuiltinException will be thrown. Bit indexing starts from the end of the ByteString.
- Example
-
writeBits(hex"0000", List(0, 1, 2, 3), true) == hex"000F"
writeBits(hex"000F", List(0, 1, 2, 3), false) == hex"0000"
writeBits(hex"000F", List(16), true) throws BuiltinException
- Inherited from:
- AbstractBuiltins (hidden)
Bitwise logical XOR for ByteStrings.
Bitwise logical XOR for ByteStrings.
Value parameters
- lhs
-
The left-hand side
ByteString
. - rhs
-
The right-hand side
ByteString
. - shouldPad
-
Indicates whether to truncate the result to the length of the shorter input, or to pad with the remaining values from the longer one.
Attributes
- Returns
-
The result of the bitwise XOR operation.
- See also
-
[CIP-122] (https://github.com/cardano-foundation/CIPs/tree/master/CIP-0122). Performs a logical bitwise XOR operation on each byte between two ByteStrings sequentially and returns the result(Formally result[i] = lhs[i] ˆ rhs[i]). The argument shouldPad determines what to do in the case when ByteStrings are of different lengths. If shouldPad is false, the result will be the length of the shorter input. Otherwise, the result will be padded with the remaining values from the longer input.
- Example
-
xorByteString(false, hex"0FFF", hex"FF") == hex"F0"
xorByteString(true, hex"0FFF", hex"FF") == hex"F0FF"
- Inherited from:
- AbstractBuiltins (hidden)
Deprecated and Inherited methods
Attributes
- Deprecated
- true
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Deprecated
- true
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Deprecated
- true
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Deprecated
- true
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Deprecated
- true
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Deprecated
- true
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Deprecated
- true
- Inherited from:
- AbstractBuiltins (hidden)
Attributes
- Deprecated
- true
- Inherited from:
- AbstractBuiltins (hidden)