CCF
CCF copied to clipboard
Validate constitutions on the server
To prevent "invalid" constitutions being submitted and locking a service, we should add some utility functions to the governance JS API to validate a constitution script. As a minimum, we should be able to spin up an isolated JS interpreter and confirm that the proposed constitution is parseable. Ideally, that should return some description of the constitution as though it was a loaded module, so that (default, sample) constitutions can check the proposed constitution still contains the expected validate, resolve, and apply functions.