Lines
100 %
Functions
66.67 %
Branches
//! Host-dependent nomiscript prelude (ADR-0029).
//!
//! These helpers call RPC host fns (`list-splits-by-transaction`, …) that only
//! exist after `register_host_fns`, so — unlike the universal prelude baked
//! into `SymbolTable::with_builtins` — they load only on the rpc Session path.
//! Exposed here so `Session::new` and the Metro compile test share one source.
use nomiscript::SymbolTable;
/// The host-prelude nomiscript source (DEFUN-only).
pub const SOURCE: &str = include_str!("host_prelude.nms");
/// Registers the host-prelude defuns into `symbols`. Must be called AFTER
/// `register_host_fns` so the natives the helper bodies reference are present.
pub fn load(symbols: &mut SymbolTable) {
symbols.load_nomiscript_defuns(SOURCE, "rpc host prelude");
}