Module instruction

Module instruction 

Source

Structs§

AbsOperation
The implementation of the binary operation.
AbsWrappedOperation
The implementation of the binary operation.
AddOperation
The implementation of the binary operation.
AddWrappedOperation
The implementation of the binary operation.
AndOperation
The implementation of the binary operation.
AssertInstruction
Asserts an operation on two operands.
Async
Invokes the asynchronous call on the operands, producing a future.
Call
Calls the operands into the declared type. i.e. call transfer r0.owner 0u64 r1.amount into r1 r2;
CastOperation
Casts the operands into the declared type.
CommitInstruction
Commits the operand into the declared type.
DeserializeInstruction
Deserializes the operand into the declared type.
DivOperation
The implementation of the binary operation.
DivWrappedOperation
The implementation of the binary operation.
DoubleOperation
The implementation of the binary operation.
ECDSAVerify
Computes whether signature is valid for the given address and message.
GreaterThanOperation
The implementation of the binary operation.
GreaterThanOrEqualOperation
The implementation of the binary operation.
HashInstruction
Hashes the operand into the declared type.
InvOperation
The implementation of the binary operation.
IsInstruction
Computes an equality operation on two operands, and stores the outcome in destination.
LessThanOperation
The implementation of the binary operation.
LessThanOrEqualOperation
The implementation of the binary operation.
Literals
ModuloOperation
The implementation of the binary operation.
MulOperation
The implementation of the binary operation.
MulWrappedOperation
The implementation of the binary operation.
NandOperation
The implementation of the binary operation.
NegOperation
The implementation of the binary operation.
NorOperation
The implementation of the binary operation.
NotOperation
The implementation of the binary operation.
OrOperation
The implementation of the binary operation.
PowOperation
The implementation of the binary operation.
PowWrappedOperation
The implementation of the binary operation.
RemOperation
The implementation of the binary operation.
RemWrappedOperation
The implementation of the binary operation.
SerializeInstruction
Serialize the operand into the declared type.
ShlOperation
The implementation of the binary operation.
ShlWrappedOperation
The implementation of the binary operation.
ShrOperation
The implementation of the binary operation.
ShrWrappedOperation
The implementation of the binary operation.
SignatureVerification
Computes whether signature is valid for the given address and message.
SquareOperation
The implementation of the binary operation.
SquareRootOperation
The implementation of the binary operation.
SubOperation
The implementation of the binary operation.
SubWrappedOperation
The implementation of the binary operation.
TernaryOperation
The implementation of the binary operation.
XorOperation
The implementation of the binary operation.

Enums§

CallOperator
The operator references a function name or closure name.
CastType
The type of the cast operation.
CommitVariant
Which commit function to use.
DeserializeVariant
The deserialization variant.
ECDSAVerifyVariant
Which hash function to use.
HashVariant
Which hash function to use.
Instruction
Opcode
The Opcode enum stores the mnemonic for the instruction.
Operand
The Operand enum represents the options for an operand in an instruction. This enum is designed to for instructions such as add {Register} {Literal} into {Register}.
SerializeVariant
The serialize variant.

Traits§

Operation

Functions§

evaluate_commit
Evaluate a commit operation.
evaluate_deserialize
Evaluate a deserialize operation.
evaluate_ecdsa_verification
Evaluate an ECDSA verification operation.
evaluate_hash
Evaluate a hash operation.
evaluate_schnorr_verification
Evaluate a Schnorr verification operation.
evaluate_serialize
Evaluate a serialize operation.

Type Aliases§

Abs
Compute the absolute value of first, checking for overflow/underflow, and storing the outcome in destination.
AbsWrapped
Compute the absolute value of first, wrapping around at the boundary of the type, and storing the outcome in destination.
Add
Adds first with second, storing the outcome in destination.
AddWrapped
Adds first with second, wrapping around at the boundary of the type, and storing the outcome in destination.
And
Performs a bitwise and on first and second, storing the outcome in destination.
AssertEq
Asserts two operands are equal to each other.
AssertNeq
Asserts two operands are not equal to each other.
BinaryLiteral
A binary literal operation.
Cast
The cast instruction.
CastLossy
The cast.lossy instruction.
CommitBHP256
BHP256 is a collision-resistant function that processes inputs in 256-bit chunks.
CommitBHP512
BHP512 is a collision-resistant function that processes inputs in 512-bit chunks.
CommitBHP768
BHP768 is a collision-resistant function that processes inputs in 768-bit chunks.
CommitBHP1024
BHP1024 is a collision-resistant function that processes inputs in 1024-bit chunks.
CommitPED64
Pedersen64 is a collision-resistant function that processes inputs in 64-bit chunks.
CommitPED128
Pedersen128 is a collision-resistant function that processes inputs in 128-bit chunks.
DeserializeBits
Deserializes the bits into a value.
DeserializeBitsRaw
Deserializes the raw bits into a value.
Div
Divides first by second, storing the outcome in destination.
DivWrapped
Divides first by second, wrapping around at the boundary of the type, storing the outcome in destination.
Double
Doubles first, storing the outcome in destination.
ECDSAVerifyDigest
The ECDSA signature verification instruction using a precomputed digest.
ECDSAVerifyDigestEth
The ECDSA signature verification instruction using a precomputed digest and an Ethereum address.
ECDSAVerifyKeccak256
The ECDSA signature verification instruction using Keccak256.
ECDSAVerifyKeccak384
The ECDSA signature verification instruction using Keccak384.
ECDSAVerifyKeccak512
The ECDSA signature verification instruction using Keccak512.
ECDSAVerifyKeccak256Eth
The ECDSA signature verification instruction using Keccak256 and an Ethereum address.
ECDSAVerifyKeccak256Raw
The ECDSA signature verification instruction using Keccak256 with raw inputs.
ECDSAVerifyKeccak384Eth
The ECDSA signature verification instruction using Keccak384 and an Ethereum address.
ECDSAVerifyKeccak384Raw
The ECDSA signature verification instruction using Keccak384 with raw inputs.
ECDSAVerifyKeccak512Eth
The ECDSA signature verification instruction using Keccak512 and an Ethereum address.
ECDSAVerifyKeccak512Raw
The ECDSA signature verification instruction using Keccak512 with raw inputs.
ECDSAVerifySha3_256
The ECDSA signature verification instruction using SHA3-256.
ECDSAVerifySha3_384
The ECDSA signature verification instruction using SHA3-384.
ECDSAVerifySha3_512
The ECDSA signature verification instruction using SHA3-512.
ECDSAVerifySha3_256Eth
The ECDSA signature verification instruction using SHA3-256 and an Ethereum address.
ECDSAVerifySha3_256Raw
The ECDSA signature verification instruction using SHA3-256 with raw inputs.
ECDSAVerifySha3_384Eth
The ECDSA signature verification instruction using SHA3-384 and an Ethereum address.
ECDSAVerifySha3_384Raw
The ECDSA signature verification instruction using SHA3-384 with raw inputs.
ECDSAVerifySha3_512Eth
The ECDSA signature verification instruction using SHA3-512 and an Ethereum address.
ECDSAVerifySha3_512Raw
The ECDSA signature verification instruction using SHA3-512 with raw inputs.
GreaterThan
Computes whether first is greater than second as a boolean, storing the outcome in destination.
GreaterThanOrEqual
Computes whether first is greater than or equal to second as a boolean, storing the outcome in destination.
HashBHP256
BHP256 is a collision-resistant hash function that processes inputs in 256-bit chunks.
HashBHP512
BHP512 is a collision-resistant hash function that processes inputs in 512-bit chunks.
HashBHP768
BHP768 is a collision-resistant hash function that processes inputs in 768-bit chunks.
HashBHP256Raw
BHP256Raw is a collision-resistant hash function that processes the input’s raw bits in 256-bit chunks.
HashBHP512Raw
BHP512Raw is a collision-resistant hash function that processes the input’s raw bits in 512-bit chunks.
HashBHP768Raw
BHP768Raw is a collision-resistant hash function that processes the input’s raw bits in 768-bit chunks.
HashBHP1024
BHP1024 is a collision-resistant hash function that processes inputs in 1024-bit chunks.
HashBHP1024Raw
BHP1024Raw is a collision-resistant hash function that processes the input’s raw bits in 1024-bit chunks.
HashKeccak256
Keccak256 is a cryptographic hash function that outputs a 256-bit digest.
HashKeccak384
Keccak384 is a cryptographic hash function that outputs a 384-bit digest.
HashKeccak512
Keccak512 is a cryptographic hash function that outputs a 512-bit digest.
HashKeccak256Native
Keccak256Native is a cryptographic hash function that outputs a 256-bit digest as a bit array.
HashKeccak256NativeRaw
Keccak256NativeRaw is a cryptographic hash function that outputs a 256-bit digest as a bit array using the input’s raw bits.
HashKeccak256Raw
Keccak256Raw is a cryptographic hash function that outputs a 256-bit digest using the input’s raw bits.
HashKeccak384Native
Keccak384Native is a cryptographic hash function that outputs a 384-bit digest as a bit array.
HashKeccak384NativeRaw
Keccak384NativeRaw is a cryptographic hash function that outputs a 384-bit digest as a bit array using the input’s raw bits.
HashKeccak384Raw
Keccak384Raw is a cryptographic hash function that outputs a 384-bit digest using the input’s raw bits.
HashKeccak512Native
Keccak512Native is a cryptographic hash function that outputs a 512-bit digest as a bit array.
HashKeccak512NativeRaw
Keccak512NativeRaw is a cryptographic hash function that outputs a 512-bit digest as a bit array using the input’s raw bits.
HashKeccak512Raw
Keccak512Raw is a cryptographic hash function that outputs a 512-bit digest using the input’s raw bits.
HashManyPSD2
Poseidon2 is a cryptographic hash function that processes inputs in 2-field chunks.
HashManyPSD4
Poseidon4 is a cryptographic hash function that processes inputs in 4-field chunks.
HashManyPSD8
Poseidon8 is a cryptographic hash function that processes inputs in 8-field chunks.
HashPED64
Pedersen64 is a collision-resistant hash function that processes inputs in 64-bit chunks.
HashPED64Raw
Pedersen64Raw is a collision-resistant hash function that processes the input’s raw bits in 64-bit chunks.
HashPED128
Pedersen128 is a collision-resistant hash function that processes inputs in 128-bit chunks.
HashPED128Raw
Pedersen128Raw is a collision-resistant hash function that processes the input’s raw bits in 128-bit chunks.
HashPSD2
Poseidon2 is a cryptographic hash function that processes inputs in 2-field chunks.
HashPSD4
Poseidon4 is a cryptographic hash function that processes inputs in 4-field chunks.
HashPSD8
Poseidon8 is a cryptographic hash function that processes inputs in 8-field chunks.
HashPSD2Raw
Poseidon2Raw is a cryptographic hash function that processes the input’s raw fields in 2-field chunks.
HashPSD4Raw
Poseidon4Raw is a cryptographic hash function that processes the input’s raw fields in 4-field chunks.
HashPSD8Raw
Poseidon8Raw is a cryptographic hash function that processes the input’s raw fields in 8-field chunks.
HashSha3_256
SHA3-256 is a cryptographic hash function that outputs a 256-bit digest.
HashSha3_384
SHA3-384 is a cryptographic hash function that outputs a 384-bit digest.
HashSha3_512
SHA3-512 is a cryptographic hash function that outputs a 512-bit digest.
HashSha3_256Native
SHA3-256Native is a cryptographic hash function that outputs a 256-bit digest as a bit array.
HashSha3_256NativeRaw
SHA3-256NativeRaw is a cryptographic hash function that outputs a 256-bit digest as a bit array using the input’s raw bits.
HashSha3_256Raw
SHA3-256Raw is a cryptographic hash function that outputs a 256-bit digest using the input’s raw bits.
HashSha3_384Native
SHA3-384Native is a cryptographic hash function that outputs a 384-bit digest as a bit array.
HashSha3_384NativeRaw
SHA3-384NativeRaw is a cryptographic hash function that outputs a 384-bit digest as a bit array using the input’s raw bits.
HashSha3_384Raw
SHA3-384Raw is a cryptographic hash function that outputs a 384-bit digest using the input’s raw bits.
HashSha3_512Native
SHA3-512Native is a cryptographic hash function that outputs a 512-bit digest as a bit array.
HashSha3_512NativeRaw
SHA3-512NativeRaw is a cryptographic hash function that outputs a 512-bit digest as a bit array using the input’s raw bits.
HashSha3_512Raw
SHA3-512Raw is a cryptographic hash function that outputs a 512-bit digest using the input’s raw bits.
Inv
Computes the multiplicative inverse of first, storing the outcome in destination.
IsEq
Computes whether first equals second as a boolean, storing the outcome in destination.
IsNeq
Computes whether first does not equals second as a boolean, storing the outcome in destination.
LessThan
Computes whether first is less than second as a boolean, storing the outcome in destination.
LessThanOrEqual
Computes whether first is less than or equal to second as a boolean, storing the outcome in destination.
Modulo
Computes the result of first mod second, storing the outcome in the destination.
Mul
Multiplies first and second, storing the outcome in destination.
MulWrapped
Multiplies first and second, wrapping around at the boundary of the type, storing the outcome in destination.
Nand
Returns false if first and second are true, storing the outcome in destination.
Neg
Negates first, storing the outcome in destination.
Nor
Returns true if neither first nor second is true, storing the outcome in destination.
Not
Flips each bit in the representation of first, storing the outcome in destination.
Or
Performs a bitwise or on first and second, storing the outcome in destination.
Pow
Raises first to the power of second, storing the outcome in destination.
PowWrapped
Raises first to the power of second, wrapping around at the boundary of the type, storing the outcome in destination.
Rem
Divides first by second, storing the remainder in destination.
RemWrapped
Divides first by second, wrapping around at the boundary of the type, storing the remainder in destination.
SerializeBits
Serializes the bits of the input.
SerializeBitsRaw
Serializes the raw bits of the input.
Shl
Shifts first left by second bits, storing the outcome in destination.
ShlWrapped
Shifts first left by second bits, continuing past the boundary of the type, storing the outcome in destination.
Shr
Shifts first right by second bits, storing the outcome in destination.
ShrWrapped
Shifts first right by second bits, continuing past the boundary of the type, storing the outcome in destination.
SignVerify
Computes whether signature is valid for the given address and message.
Square
Squares first, storing the outcome in destination.
SquareRoot
Computes the square root of first, storing the outcome in destination.
Sub
Computes first - second, storing the outcome in destination.
SubWrapped
Computes first - second, wrapping around at the boundary of the type, and storing the outcome in destination.
Ternary
Selects first, if condition is true, otherwise selects second, storing the result in destination.
TernaryLiteral
A ternary literal operation.
UnaryLiteral
A unary literal operation.
Xor
Performs a bitwise xor on first and second, storing the outcome in destination.