Skip to content

Module dev_genesis_wasm.erl

A device that mimics an environment suitable for legacynet AO processes, using HyperBEAM infrastructure.

Description

This allows existing legacynet AO process definitions to be used in HyperBEAM.

Function Index

collect_events/1*Collect events from the port and log them.
collect_events/2*
compute/3All the delegated-compute@1.0 device to execute the request.
ensure_started/1*Ensure the local genesis-wasm@1.0 is live.
init/3Initialize the device.
is_genesis_wasm_server_running/1*Check if the genesis-wasm server is running, using the cached process ID if available.
log_server_events/1*Log lines of output from the genesis-wasm server.
normalize/3Normalize the device.
snapshot/3Snapshot the device.
status/1*Check if the genesis-wasm server is running by requesting its status endpoint.

Function Details

collect_events/1 *

collect_events(Port) -> any()

Collect events from the port and log them.

collect_events/2 *

collect_events(Port, Acc) -> any()

compute/3

compute(Msg, Msg2, Opts) -> any()

All the delegated-compute@1.0 device to execute the request. We then apply the patch@1.0 device, applying any state patches that the AO process may have requested.

ensure_started/1 *

ensure_started(Opts) -> any()

Ensure the local genesis-wasm@1.0 is live. If it not, start it.

init/3

init(Msg, Msg2, Opts) -> any()

Initialize the device.

is_genesis_wasm_server_running/1 *

is_genesis_wasm_server_running(Opts) -> any()

Check if the genesis-wasm server is running, using the cached process ID if available.

log_server_events/1 *

log_server_events(Bin) -> any()

Log lines of output from the genesis-wasm server.

normalize/3

normalize(Msg, Msg2, Opts) -> any()

Normalize the device.

snapshot/3

snapshot(Msg, Msg2, Opts) -> any()

Snapshot the device.

status/1 *

status(Opts) -> any()

Check if the genesis-wasm server is running by requesting its status endpoint.