Module themelio_stf::melvm[][src]

Structs

CoinData

The data bound to a coin ID. Contains the “contents” of a coin, i.e. its constraint hash, value, and coin type.

CoinID

A coin ID, consisting of a transaction hash and index. Uniquely identifies a coin in Themelio’s history.

CovHash

A newtype representing the hash of a covenant.

Covenant

A MelVM covenant. Essentially, given a transaction that attempts to spend it, it either allows the transaction through or doesn’t.

CovenantEnv

The execution environment of a covenant.

Executor
Transaction

Transaction represents an individual, serializable Themelio transaction.

Enums

AddrParseError
OpCode
Value

Constants

ADDR_LAST_HEADER

Heap address where the header of the last block is put. If the covenant is being evaluated for a transaction in block N, this is the header of block N-1.

ADDR_PARENT_ADDITIONAL_DATA

Heap address where the additional data of the coin being spent is put.

ADDR_PARENT_DENOM

Heap address where the denomination of the coin being spent is put.

ADDR_PARENT_HEIGHT

Heap address where the height of the parent is put.

ADDR_PARENT_INDEX

Heap address where the index, at the parent, of the coin being spent is put. For example, if we are spending the third output of some transaction, Heap[ADDR_PARENT_INDEX] = 2.

ADDR_PARENT_TXHASH

Heap address where the parent (the transaction that created the coin now getting spent)’s hash is put

ADDR_PARENT_VALUE

Heap address where the face value of the coin being spent is put.

ADDR_SELF_HASH

Heap address where the hash of the running covenant is put.

ADDR_SPENDER_INDEX

Heap address where the “spender index” is put. For example, if this coin is spent as the first input of the spender, then Heap[ADDR_SPENDER_INDEX] = 0.

ADDR_SPENDER_TX

Heap address where the transaction trying to spend the coin encumbered by this covenant (spender) is put

ADDR_SPENDER_TXHASH

Heap address where the spender’s hash is put.