Skip to main content

Crate miden_tx_script_args

Crate miden_tx_script_args 

Source
Expand description

Typed transaction-script argument transport via the TX_SCRIPT_ARGS word.

The transaction kernel hands a transaction script a single Word of arguments. This crate defines how typed argument values travel through that word: short, statically sized encodings are packed into the word itself, while longer or variable-length encodings are committed to by hash and passed through the advice provider.

The crate is shared between on-chain and off-chain code: ScriptArgs::encode, decode_preimage, and word-mode ScriptArgs::decode are pure and run anywhere, while the advice-provider transport sits behind the miden-vm-guest feature (enabled by the miden SDK crate) — no host build, native or wasm, depends on the on-chain SDK bindings.

Enums§

EncodedScriptArgs
Encoded transaction-script arguments produced by ScriptArgs::encode.
ScriptArgsError
Failure decoding transaction-script arguments from the TX_SCRIPT_ARGS word.

Traits§

ScriptArgs
Transaction-script arguments transported through the TX_SCRIPT_ARGS word.

Functions§

decode_preimage
Decodes a value from a commitment-mode preimage, enforcing the whole-word length and the canonical zero padding.

Type Aliases§

ScriptArgsResult
Convenience alias for results returned by script-args decoding.