Skip to main content

Crate mhome_script_api

Crate mhome_script_api 

Source
Expand description

Shared contracts for the TypeScript/JavaScript script migration.

These models do not authorize an invocation or implement an interpreter. Deserialize, validate, and then resolve ownership against trusted caller context.

Structs§

ContractError
Field
ListType
ScriptArtifact
Metadata and source must be bound by the same verified manifest.
ScriptContract
Build-generated metadata from defineScript. Every top-level field is required.
ScriptError
ValueLimits

Enums§

ArtifactFormat
FieldType
Scalar tags or recursively nested {“list”: …}. Objects remain intentionally dynamic.
ScalarType
ScriptOutcome
Internal outcome only. TypeScript functions return data or throw ScriptError.
ScriptRef
Exact immutable resource identity. Tenant and Space are deliberately not caller fields.
ScriptValue
Owned values at the native script boundary. Domain objects retain their _type/unit/value or URI fields; adapters interpret them without losing units. The tagged wire representation is only for process boundaries, not local calls.

Constants§

ARTIFACT_FORMAT
CONTRACT_VERSION
MAX_ARTIFACT_BYTES
MAX_CONTRACT_DEPTH
MAX_CONTRACT_FIELDS
MAX_FUNCTIONS
MAX_SAFE_VERSION
MAX_SOURCE_BYTES
MAX_YAML_BYTES
SCRIPT_CALL_OPCODE
New instruction layout; the former Wasm 0x13 and 0x1c layouts are not aliases.
SCRIPT_CALL_OPERANDS

Functions§

is_identifier
validate_sdk_version
validate_sha256