Since Ledger v2.2, two versions of the Numscript interpreter are available: the original, built directly into our Ledger service, and a new portable and embeddable interpreter that can run independently or enhance other ledgering systems.
The original interpreter is enabled by default but is no longer evolving, while the new version will receive ongoing updates and must be manually enabled.
To enable the new interpreter:
ledger.experimental-featurestruedefault: falseboolEnables general experimental features in the ledger by setting the EXPERIMENTAL_FEATURES environment variable on the deployment.
ledger.experimental-numscripttruedefault: falseboolEnables the experimental Numscript interpreter in the ledger by setting the EXPERIMENTAL_NUMSCRIPT_INTERPRETER environment variable.
The new interpreter supports additional language features not available in the original, including oneof, account interpolation, asset colors, and more. See the Numscript reference for the full list and how to enable each one.
The Numscript playground uses the new interpreter. Experimental features can be toggled individually in the playground's feature flags selector.